A permutation of length is given.
In one reversal, choose two integers satisfying both conditions below.
Then reverse the order of the contiguous segment .
Sort in increasing order using at most reversals, and print the reversals you used.
The input is given from Standard Input in the following format:
case case
For each test case, print the number of reversals on the first line.
Then print lines. On the -th line, print the two integers chosen for the -th reversal.
In the first test case, every printed interval has length at least . In the second test case, every printed interval has length at least . Applying the printed reversals in order sorts both permutations.
Each case is given in the following format:
The output must satisfy all conditions below.
If there are multiple solutions, print any of them.