Problem D
Ný mylla

A common pastime among children is playing tic tac toe. But after playing for a short time most adults notice that optimal play leads to draws. So to ease the wait while their computers work, some professors of Computer Science at HÍ invented a new version of tic tac toe to play. The game is played on a finite grid. Each move consists of a player choosing a square that hasn’t been filled. They then fill that square. They then fill all the squares to the immediate right of the first square until they reach the end of the grid or another filled square. This is then repeated to the left, up and down. For the move to be legal at least $k$ squares must be filled during this process. The game is over when there are no legal moves left, and the player who made the last move wins. Since they are professors of Computer Science they have already written programs that play the game perfectly. You are interested in finding out who wins.


The input consists of single line with three integers $1 \leq n, m, k \leq 100$, where $n$ denotes width of the grid, $m$ denotes the height of the grid, and $k$ is as described above.


If the first player to move wins print ‘Fyrri!’. Otherwise print ‘Seinni!’.

Sample Input 1 Sample Output 1
3 3 1
Sample Input 2 Sample Output 2
2 2 1
Sample Input 3 Sample Output 3
2 2 2

Please log in to submit a solution to this problem

Log in