There are N students. For each i with 1≤i≤N, student i scores i points on the exam. The students are split into groups, and at the start group i holds only student i.
Write a program that supports the following two operations.
Each test case contains L operations.
The first line contains an integer T (T≤5), the number of test cases. Each test case follows in the format below.
The first line of a test case contains two integers N and L (1≤N≤100000, 1≤L≤200000).
Each of the next L lines describes one operation. The line starts with an integer K, the type of the operation.
Both groups given in a merge operation still exist at that moment, and X and Y are different.
For each query operation, print the rank of that student on its own line. Print the answers of all test cases in the order the queries appear.