A game of tic-tac-toe is played on a square grid. Each cell is either empty (denoted by '.') or occupied by one of the two players ('X' and 'O'). X goes first and then they take turns alternatively. If X is written three times in a straight line, then X wins and the game ends. The same goes for O. If there is no empty cell left, then the game ends as a draw.
You are given the description of a game of tic-tac-toe. You have to determine the state of the game.
The states of the game are as follows:
Sample Input 2
... ... ...
Sample Output 2
X's turn.
None.