Tic-tac-toe#633

Tic-tac-toe

1 second
128 megabytes
Easy

Once, two friends were walking down the street when they found a notebook left on a bench. Inside were some mysterious numbers. At first, they thought it might be a secret code left by a spy. As they prepared to leave, the owner of the notebook arrived and explained that these numbers were merely records of moves in the game "Gomoku."

Gomoku (a variant of tic-tac-toe) is a logical game played between two opponents on an infinite rectangular board. One player uses crosses, the other noughts. Players alternately place their symbols (crosses or noughts) on empty cells. The first player to align or more of their symbols vertically, horizontally, or diagonally wins. The player using crosses always moves first.

The friends became interested in who won the game, so they decided to write a program to determine the winner. They were especially careful because the board used for the game was very large. Nevertheless, by evening, they knew the winner.

Can you solve this problem?

Input

The first line contains an integer (0 \leq n \leq 10000) — the number of moves made. Each of the following lines contains two integers and (|x|, |y| \leq 10^9) — the coordinates of the cell where the next symbol was placed.

Output

Print "First player won" if the first player won, and "Second player won" if the second player won. If neither player managed to win, print "Draw". If after some move five identical symbols are aligned in a row, but players continue to make moves, print only "Inconsistent". It is guaranteed that no player makes a move in an already occupied cell. The board is empty at the start.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading