<PREV Problem:
NEXT>
Solved by 1115 users: ...
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 

Nim Game -- who is the winner?

Time limit: 3 seconds.

You are to detect the status of the position in the Nim Game. There are stone piles: n1, n2, ... , nk. The ni gives the number of stones in the i-th pile. You are permited to take any quantity of stones from one pile for a move. Who takes the last stone(s) wins.

Input is the number of piles and piles sizes. k < 50, ni < 230.

Output is either "First wins." or "Second wins." without quots.

SAMPLE INPUT:
3
3 2 1
SAMPLE OUTPUT:
Second wins. 

SAMPLE INPUT:
3
5 2 1
SAMPLE OUTPUT:
First wins. 

Authors:
Voroztsov Artem

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 180ms

SW soft NIX
ID = 54.224.164.166