|Online MIPT programming contest||РУССКИЙ|
Time limit = 5 secondsThe Camomile Game has following rules. Camomile is a flower with N petals.
Two playes make their moves in turn. For a move a player can pull out any petal or two petals growing side by side.
The player who can't make move looses.
It's easy to find out that the second player has winning strategy for N > 2.
We have M camomiles each with one petal pulled out. Your program should determine who has winning strategy in this game.
Input The number of camomiles M, 1 ≤ M ≤ 10 folowed by M lines with numbers of petals on camomiles Ni ( Ni < 200 ).
Line with "
First wins." or "
2 10 10
3 6 7 8
© acm.mipt DevGroup
The page was generated in 200ms