This is interactive problem.
Rules of the Minesweeper game are simple: given a grid 16 × 16. Each cell in the grid either is empty or contains a mine. Goal of the game is to label all mines with the flags and open all empty cells. If player opens empty cell, it contains one integer — number of mines in neighbor cells. Two cells are neighbors, if their borders have at least one common point (so each internal cell have 8 neighbors). If a cell, containing an integer 0 is opened (by player or automatically), all neighbors of this cell are opened automatically.
Player can do the following operations:
If after the end of game all empty cells are opened and all cells with mines are labeled, player wins, otherwise game is lost.
You are given coordinates of cell, which does not contain a mine. Moreover, it's guaranteed that it's possible to win the game without any nondeterministic situation (where guessing is needed). Your goal is to win.
At the beginning of interaction your program must read two integers — row r and column c of the safe cell (1 ≤ r, c ≤ 16).
Then on each your request you receive next information:
First line of the answer contains one integer N — number of cells with changed status. Each of next N lines contain two integers ri and ci — row and column of the cell, and si — status of the cell: digit between 0 and 8, if the cell is empty, '_*_', if the cell was labeled or '_-_', if label from cell was removed.
If you want to finish the game, print ("_4_") and end of the line. Otherwise print three space-separated integers: type of operation, row and column (1-based) of the cell to which it is applied. Do not forget to add end of the line character and flush the output buffer.
Sample in the statement contains example of the interaction protocol for board 3 × 3.
## Input
At the beginning of interaction your program must read two integers — row r and column c of the safe cell (1 ≤ r, c ≤ 16). Then on each your request you receive next information: First line of the answer contains one integer N — number of cells with changed status. Each of next N lines contain two integers ri and ci — row and column of the cell, and si — status of the cell: digit between 0 and 8, if the cell is empty, '_*_', if the cell was labeled or '_-_', if label from cell was removed.
## Output
If you want to finish the game, print ("_4_") and end of the line. Otherwise print three space-separated integers: type of operation, row and column (1-based) of the cell to which it is applied. Do not forget to add end of the line character and flush the output buffer.
[samples]
## Note
Sample in the statement contains example of the interaction protocol for board 3 × 3.
**Definitions**
Let $ G $ be a $ 16 \times 16 $ grid. Each cell $ (i,j) \in \{1,\dots,16\}^2 $ has state $ s_{i,j} \in \{0,1,2,3,4,5,6,7,8, \text{mine}, \text{flag}, \text{hidden}\} $.
Let $ M \subseteq \{1,\dots,16\}^2 $ be the set of mine locations (unknown initially).
Let $ S \subseteq \{1,\dots,16\}^2 $ be the set of safe (non-mine) cells.
**Given**
A safe cell $ (r_0, c_0) \in S $ is revealed initially: $ s_{r_0,c_0} = n_0 \in \{0,1,\dots,8\} $.
It is guaranteed that the board is solvable deterministically (no guesses required).
**Constraints**
1. Each cell has up to 8 neighbors (Moore neighborhood).
2. Opening a cell with value 0 triggers automatic opening of all its neighbors.
3. Operations:
- Type 1: Open cell $ (r,c) $ — only allowed if $ s_{r,c} = \text{hidden} $ and $ (r,c) \notin M $.
- Type 2: Toggle flag on cell $ (r,c) $ — only allowed if $ s_{r,c} = \text{hidden} $.
4. Game ends when all non-mine cells are opened and all mine cells are flagged.
**Objective**
Determine a sequence of operations (open or flag) such that:
- All cells in $ S $ are opened (state becomes digit $ \in \{0,\dots,8\} $),
- All cells in $ M $ are flagged,
- No cell is opened that contains a mine.
**Interaction Protocol**
- Read initial safe cell $ (r_0, c_0) $.
- For each query:
- Output: `1 r c` (open) or `2 r c` (toggle flag).
- Receive:
- Integer $ N $: number of state-changed cells.
- $ N $ lines: $ r_i, c_i, s_i $, where $ s_i \in \{0,\dots,8, \text{'*'}, \text{'-'}\} $.
- To finish: output `4`.