Consider $$$N$$$ different points on the $$$Ox$$$ axis, numbered $$$1, 2, \ldots, N$$$ from left to right. Each point has a color: the color of point $$$i$$$ is $$$A_i$$$.
You want to draw several curves, each curve connecting two points. However, there are the following restrictions.
For example, if there are 4 points as shown below, points 1 and 2 are red, and points 3 and 4 are blue, you can draw a total of 3 curves: between points 1 and 4, 2 and 3, 2 and 4.
Drawing 4 curves would violate at least one of the three restrictions above, so 3 is the maximum in this case.
Given the color of each point, find a way to draw as many curves connecting two points as possible without violating any restrictions, and print which two points each curve connects.
The first line contains an integer $$$T$$$, the number of test cases ($$$1 \le T \le 101$$$). The test cases follow.
The first line of each test case has the number of points $$$N$$$ and the number of colors $$$M$$$ ($$$2 \le N \le 200\,000$$$, $$$2 \le M \le N$$$).
The next line contains $$$N$$$ integers $$$A_1, A_2, \ldots, A_N$$$ ($$$1 \le A_i \le M$$$).
The sum of $$$N$$$ over all test cases does not exceed $$$200\,000$$$.
For each test case, start with a line containing an integer $$$K$$$: the maximum number of curves connecting two points.
In each of the next $$$K$$$ lines, print the indices of the two points connected by a curve. The curves must satisfy all the restrictions above. If there are several possible answers, print any one of them.
3 4 2 1 1 2 2 4 2 1 2 1 2 3 3 1 2 3
3 2 3 2 4 4 1 4 1 2 2 3 3 4 4 1 3 3 1 1 2 2 3
| Name |
|---|


