Output
For each test case, in the first line output two space-separated integers: minimum number of tokens that will be replaced, x, and minimum number of converted annotations, y.
In the following y lines, you can output the annotations in any order. R should be omitted as it is the only type that is allowed. The annotations should be non-overlapping, non-empty and follow the exactly same format as input.
Note
For the first test case, [2,3] is replaced with 1, [4,6] is replaced with 2,3, and the corrected sequence is 1,1,2,3. The optimal correction with only R is to replace [2,6] with 1,2,3.
For the second test case, the corrected sequence is 1,2,4,6,5. Although A and D cannot be used, if we merge the consecutive annotations, only 4 tokens need to be replaced.
In the third test case, we show that the corrected sequence can be longer than the original sequence, which is 2,1,2,3,4,5,5,6.