| CAMA 2024 |
|---|
| Finished |
Rigo wants to take a bath, and for that, he needs to fill his bathtub. Rigo has $$$n$$$ buckets of water, each containing $$$p_i$$$ liters, where $$$p$$$ is a permutation of size $$$n$$$. Additionally, his bathtub can hold $$$2n-1$$$ liters if the water is cold and $$$2n+1$$$ liters if it is hot. Although Rigo is a very good mathematician, he is disorganized and has forgotten to label each bucket with its volume, so he asks for your help to assign each bucket its corresponding label in liters.
To do this, you can ask two types of questions:
Write a program that returns the permutation $$$p$$$ without running out of coins, making at most $$$2$$$ questions of type $$$2$$$ and $$$100000$$$ questions of type $$$1$$$.
The first line of the input contains a single integer $$$T$$$, the number of cases to solve. $$$(1 \le T \le 10)$$$.
Each case starts with a single integer $$$n$$$, the number of buckets, followed by the interaction. $$$(1 \le n \le 6000)$$$.
It is guaranteed that the sum of $$$n$$$ over all tests does not exceed $$$6000$$$.
To make a type $$$1$$$ question, the program must have the following format.
To make a type $$$2$$$ question, the format must be as follows:
Finally, to provide the answer, the program must print a single line in the following format:
If your program asks more than $$$2$$$ questions of type $$$2$$$ or $$$10^5$$$ questions of type $$$1$$$ for a test case, it must terminate immediately to receive the verdict Wrong Answer. Otherwise, you could receive an arbitrary verdict because your solution will attempt to continue reading from a closed stream.
Additionally, the sum of $$$m$$$ over all questions of type $$$1$$$ over all tests must not exceed $$$10^7$$$.
After printing a question or the answer, do not forget to write the end-of-line character and flush the output buffer. Otherwise, you might get the verdict Time limit exceeded. To do this, use:
1 5 1 0 1 3
2 3 1 3 F 1 4 2 1 3 C 1 4 2 2 4 ! 3 2 4 5 1
Note that, with the questions asked, you are not guaranteed that the answer is correct. This sample is just for illustrative effect.
| Name |
|---|


