This is an interactive problem
The central piece of the Tainted Chocolate game is a classic chocolate bar divided into square pieces by a rectangular grid of grooves parallel to its sides. Some squares have been tainted with an extremely bitter substance that makes them (nearly) inedible.
The game is played by two players who move alternately. On each move, a player must eat part of the chocolate bar: they split the current bar along one of the grooves into two smaller bars and eat one of them. The player who eats a piece containing at least one tainted square loses the game.
The positions of all tainted squares are known at the start of the game; all other squares are safe to eat. Each player tries to avoid eating a piece that contains tainted squares because, when this happens, the player involuntarily makes their most disgusted grimace, which greatly amuses not only the opponent but also the onlookers.
In this problem, you are to write a program that plays the Tainted Chocolate game. We omit the part of the code that simulates the players' grimaces and chocolate consumption and focus solely on the winning moves.
A move is described by a direction string and a positive integer . The direction string is one of the following: "top", "bottom", "left", or "right". Such a move means that the current bar is split along the -th groove counted from the specified side, and the player eats the part on that side.
The first line contains three integers , , and k~(1 \le r, c \le 10^4, 1 \le k \le 100) — the number of rows, the number of columns, and the number of tainted squares, respectively. Each of the next lines contains two integers and b~(1 \le a \le r, 1 \le b \le c) — the row and column of a tainted square. The top-left square has coordinates .
The rest of the input depends on your output. After your "pass" (if any) and after each of your moves, you will receive one line containing either the opponent's move or the string "yuck!", meaning that the opponent has lost the game. In the latter case, your program must terminate.
After reading the description of the bar, you may decide whether to move first. If you want to move second, print a single line containing the string "pass". This string may appear only as the very first line of your output.
Then, for each of your moves, print one line containing a valid move description. Your program will receive Wrong Answer if it outputs anything other than a sequence of valid moves leading to victory.
After printing each move, flush the output buffer, for example, using fflush(stdout) or cout.flush() in C++, System.out.flush() in Java, or stdout.flush() in Python.
Example 1
Example 2