This is an interactive problem.
Cyber-shark Zubastik$$$^{\dagger}$$$ works in a warehouse and stacks boxes into a single vertical tower. The height of the tower is unlimited, but the shark can only remove and place the top box on the tower. There is also a buffer nearby — a free area where boxes can be temporarily held (any number of boxes can be in the buffer).
Boxes are numbered in the order they arrive, starting from $$$1$$$. For each box, the moment in time $$$t_j$$$ when it needs to be extracted from the warehouse is known.
During the work, there are two types of events:
Actions. During the processing of an event, the shark can perform the following operations:
Rules for processing events.
Your task is to output a set of operations for each event that correctly processes that event.
$$$^{\dagger}$$$ see fig.
Cyber-shark Zubastik The first line contains $$$T$$$ — the number of moments in time to consider.
In the $$$i$$$-th of the subsequent $$$T$$$ lines, the description of the next event occurring at time $$$i$$$ is given in the following format:
For each event, you need to output a sequence of operations that will process it.
First, an integer $$$K$$$ — the number of operations.
Then a list of $$$K$$$ operations — for each, two numbers:
The total number of operations output across all events must not exceed $$$10^6$$$. If this limit is violated, the solution will receive a verdict of Wrong Answer.
First, your program must read an integer $$$T$$$ — the number of events.
Then for each $$$i = 1,2,\dots,T$$$, the interactor outputs a line with the description of the event occurring at time $$$i$$$:
After receiving the next event, your program must output the response for it in the following format:
To receive the next event, you must output a correct response for the current event and end the line with a newline character.
After outputting the response, be sure to flush the output buffer:
Note that for faster output, it is advisable to call flush (or endl) after outputting all $$$K$$$ operations, rather than after each operation.
The interactor in this problem is non-adaptive: within a single test, the sequence of events is fixed and does not change based on your responses.
In this problem, there are two types of tests.
The first type of test — an array [1, 1, 2, 2, ..., N, N] is generated and shuffled randomly, resulting in an array $$$[a_1, a_2, \dots, a_T]$$$ of size $$$T$$$, where $$$T = 2N$$$. A box is added at time $$$t_1$$$ and taken out at time $$$t_2$$$, if $$$t_1 \lt t_2$$$ and $$$a[t_1] = a[t_2]$$$.
The second type of test — it is guaranteed that the boxes are taken out in the same order they are added.
For each value of $$$N$$$ (the number of boxes), one test of each type is generated.
| Group | Tests | Values of $$$N$$$ | Points | Cumulative Sum | Dependencies |
| 1 | 1-2 | Tests from the statement | 0 per test | 0 | - |
| 2 | 3-10 | 100, 200, 330, 420 | 1 per test | 8 | - |
| 3 | 11-18 | 480, 720, 820, 1080 | 1 per test | 16 | 1 |
| 4 | 19-26 | 1240, 1420, 1630, 1870 | 1 per test | 24 | 1-2 |
| 5 | 27-30 | 2150, 2470 | 1 per test | 28 | 1-3 |
| 5 | 31-34 | 2840, 3260 | 2 per test | 36 | 1-3 |
| 6 | 35-42 | 3740, 4300, 4940, 5680 | 2 per test | 52 | 1-4 |
| 7 | 43-50 | 6530, 7500, 8620, 9910 | 2 per test | 68 | 1-5 |
| 8 | 51-58 | 11390, 13090, 15050, 17300 | 2 per test | 84 | 1-6 |
| 9 | 59-66 | 17500, 18000, 18500, 19000 | 2 per test | 100 | 1-7 |
4+ 3+ 4- 1- 2
1 1 1 3 2 1 1 2 1 1 1 2 1 1 2 2
8+ 8+ 3- 2+ 7+ 6- 4- 3- 1
1 1 1 1 1 2 1 2 2 1 1 3 1 1 4 1 2 4 1 2 3 1 2 1
| Name |
|---|


