This is an interactive problem.
Harry and Hermione are trying to hunt down which are haunting Hogwarts. There is a long hallway in Hogwarts, consisting of individual , numbered from to from the left to the right.
Hermione can cast a spell that would any cell of the hallway of her choosing. After the spell is cast, the blocked cell will remain blocked while she casts other spells.
Hoglins are simple creatures; all they do is randomly move around and bump into stuff. To be more precise, every hoglin has a range which it considers to be . Initially, when the hoglin appears, it is a range from the cell to the cell .
Initially, a single hoglin appears in a cell of the hallway chosen uniformly at random. Then, until this hoglin is caught, the following happens on every of the hunt:
To free Hogwarts from hoglins, Harry and Hermione should catch of them, but they don't have much time. They can only afford to hunt hoglins for at most rounds. Please help them find an efficient strategy to do that.
Interaction Protocol
First, the testing system will write two integers and ( --- the number of cells in Hogwarts' hallway and the number of hoglins that should be caught. Then the catching process begins.
The following interaction proceeds in rounds as described in the problem statement.
At the start of each round, your program should output Hermione's action --- an integer () representing the position of the cell Hermione is going to block. If or the cell at position is already blocked, she does nothing in this round.
Then, if the current position of the hoglin is at the newly blocked cell , the hoglin is caught; the testing system outputs , all the blocked cells become free, and interaction rounds start again. In case you caught the -th hoglin, the testing system outputs instead of , and your program should immediately stop execution.
Otherwise, the hoglin attempts to move according to the rules described in the problem statement. If in the process it bumps into any blocked cell, the testing system outputs ; otherwise, it outputs .
If your -th action does not catch the -th hoglin, the testing system outputs instead of its usual answer, and your program should immediately stop execution to guarantee the Wrong Answer verdict.
The interactor in this problem is not adaptive. It is guaranteed that the hoglins follow the rules described in the problem statement. The starting cell for each hoglin is chosen uniformly at random and their moves are chosen uniformly at random from the range of cells that they consider accessible.
The problem has at most tests.
Here is the summary of all possible interactor answers:
See also Interaction Protocol.
See also Interaction Protocol.
9 2
0
1
1
0
1
2
1
0
0
3
3
7
5
1
9
4
5
7
0
2

We show the sample from the point of view of the hoglins.
The black dot shows the current position of the hoglin.
Crosses mark blocked cells.
White cells mark the range which the hoglin considers to be accessible; other cells are marked gray.
On the right is the action that was performed by either Hermione or the hoglin to get to this state from the previous one.