
An unusual game of tic-tac-toe.
Your friend watched some video about Connect Four and memorized the winning strategy for the starting player. What a loser! Whatever they are saying sounds about as relevant to your life as this paragraph is to the problem statement. Apparently, someone found a weak solution to Connect Four which can be compressed to just $$$150\,\textrm{kB}$$$ and requires no game tree search.
To get them off their high horse, you challenge them to a real game. You pull out a piece of A4 graph paper and explain: "We will take turns picking any unpicked cell. The first player to get three consecutive cells in any row, column, or diagonal wins. I will start." Your friend is barely listening, but this is not just regular tic-tac-toe: you are playing on the whole paper. Convert your winning advantage.
This is an interactive problem. Your submission will be run against an interactor, which reads from the standard output of your submission and writes to the standard input of your submission. This interaction needs to follow a specific protocol:
There is no initial input as you make the first move.
On each of your turns, print one line with two integers $$$r$$$ and $$$c$$$ ($$$1 \le r \le 59$$$, $$$1 \le c \le 42$$$), the row and column of the cell you pick. The cell must not have been picked before.
After each of your moves, the interactor will respond with one line with two integers $$$r'$$$ and $$$c'$$$ ($$$0 \le r' \le 59$$$, $$$0 \le c' \le 42$$$).
The interactor is adaptive, so your friend's moves will depend on all previous moves.
Make sure you flush the standard output after every output. For example, you can use fflush(stdout) in C++, System.out.flush() in Java, sys.stdout.flush() in Python, std::io::stdout().flush() in Rust, and hFlush stdout in Haskell.
A testing tool is provided to help you develop your solution.
> 30 30 < 30 31 > 31 30 < 29 30 > 32 30 < 0 0
| Name |
|---|


