시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB63350.000%

문제

This is an interactive problem. You are to defeat a randomly moving jury in a series of independent rounds of the game.

The game is played on a hexagonal field with axial coordinates. The field is bounded by a hexagon with vertices in cells $(n, 0)$, $(0, n)$, $(-n, n)$, $(-n, 0)$, $(0, -n)$, and $(n, -n)$. In all test cases, except for the sample test case in this statement, which is not present in the real test set, $n=20$.

There are two players --- you and the jury. You start in the cell $(-n/2, 0)$ and the jury starts in the cell $(n/2, 0)$. Players take turns, you move first.

A field for $n=4$ (the blue cell is your starting cell and the red cell is the starting cell for the jury).

At each turn, the player moves to any cell adjacent by side, which does not contain the opponent and has not been destroyed. After that, the previously occupied cell is destroyed and is not available to players on the following turns anymore. The player who cannot move to any adjacent cell loses the game.

The jury did not come up with any smart algorithm to play this game, so they've decided to move equiprobably randomly to any valid adjacent cell on each turn.

You need to show your complete dominance --- win all of $t$ independent rounds of the game.

프로토콜

In the first line, you are given integers $t$ and $n$ --- the number of independent rounds of the game you need to win, and the field size ($1 \le t \le 50$; $n = 20$ except for the sample test case, which is not present in the real test set). 

Each turn, you need to output a line with the direction of your move --- two integers $dx, dy$, where $(dx, dy) \in \{ (1, 0)$, $(0, 1)$, $(-1, 1)$, $(-1, 0)$, $(0, -1)$, $(1, -1) \}$. After that, read one line in the following format:

  • token "move" and two integers $dx, dy$ --- direction $(dx, dy)$ where the jury moved. It is guaranteed to be chosen equiprobably randomly;
  • token "win", if the jury doesn't have any valid cells to move to. In this case, you should immediately start playing the next game, or finish your program with the exit code 0 if all $t$ rounds were played.
  • token "lose", if you made an invalid move. In this case, you should finish your program with the exit code 0 to get an adequate verdict of "Wrong answer".

It is guaranteed that there are at most 100 tests (with at most $50$ game rounds in each test) for a total of at most 5000 game rounds that you shall win. The jury uses a fixed random seed for each test. 

예제 입력 1

2 4

move -1 1

move -1 1

move -1 1

move 0 1

move -1 0

win

move 0 -1

move -1 0

lose

예제 출력 1


0 1

0 1

0 1

-1 0

-1 1

1 0

1 0

1 -1

1 0

힌트

Note that the interaction in the sample test case results in the "Wrong answer" verdict, as only 1 round out of 2 is won. The two rounds played are shown below.

The starting player wins (on the left) and loses by making an invalid move (on the right).

채점 및 기타 정보

  • 예제는 채점하지 않는다.