328. A Coloring Game
Time limit per test: 0.25
second(s)
Memory limit: 65536
kilobytes
input: standard
output: standard
Two players play a graph coloring game. They make moves in turn, first player moves first. Initially they take some undirected graph. At each move, a player can color an uncolored vertex with either white or black color (each player can use any color, possibly different at different turns). It's not allowed to color two adjacent vertices with the same color. A player that can't move loses.
After playing this game for some time, they decided to study it. For a start, they've decided to study very simple kind of graph — a chain. A chain consists of
N vertices,
v_{1},
v_{2},...,
v_{N}, and
N1 edges, connecting
v_{1} with
v_{2},
v_{2} with
v_{3},...,
v_{N1} with
v_{N}.
Given a position in this game, and assuming both players play optimally, who will win?
Input
The first line of input contains the integer
N,
.
The second line of input describes the current position. It contains
N digits without spaces.
i^{th} digit describes the color of vertex
v_{i}: 0 — uncolored, 1 — black, 2 — white. No two vertices of the same color are adjacent.
Output
On the only line of output, print "
FIRST
" (without quotes) if the player moving first in that position wins the game, and "
SECOND
" (without quotes) otherwise.
Example(s)
sample input

sample output

5
00100

SECOND

sample input

sample output

4
1020

FIRST
