You are playing Galactic Tic-Tac-Toe against Chewbacca. It works just like ordinary Tic-Tac-Toe, except the board is $5 \times 5$ and the goal is to get four in a row (horizontally, vertically, or diagonally).
In response to a brilliant move of yours, Chewbacca protests loudly and plays a move that sets you up to win. Before you can claim victory, Han Solo warns you that it is unwise to upset a Wookiee — they have been known to pull people's arms out of their sockets when they lose.
Wisely, you decide on a new strategy: let the Wookiee win!
You play O, Chewbacca plays X, and it is your turn. You must choose the single empty square to play so that:
O there does not complete four of your own marks in a row (you must not win), andX in a row on his next turn (you must not block any of his winning moves).It is guaranteed that exactly one empty square satisfies both conditions.
The input consists of one or more $5 \times 5$ boards, each separated from the next by a blank line. Within a board, the five cells of a row are separated by single spaces. You are O, Chewbacca is X, and an empty cell is written as *.
For every board it is guaranteed that exactly one empty square can be played that does not cause you to win and does not block any of Chewbacca's winning moves on his next turn.
The last board is followed by a line containing the word Finished.
For each board, print on its own line the number of the square you should play. Squares are numbered as follows.
| 1 | 2 | 3 | 4 | 5 |
| 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 |