{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cbr\u003eTwo 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\u0027s not allowed to color two adjacent vertices with the same color. A player that can\u0027t move loses.\u003cbr\u003eAfter playing this game for some time, they decided to study it. For a start, they\u0027ve decided to study very simple kind of graph\u0026nbsp;— a chain. A chain consists of \u003ci\u003eN\u003c/i\u003e vertices, \u003ci\u003ev\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, \u003ci\u003ev\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,..., \u003ci\u003ev\u003c/i\u003e\u003csub\u003e\u003ci\u003eN\u003c/i\u003e\u003c/sub\u003e, and \u003ci\u003eN\u003c/i\u003e-1 edges, connecting \u003ci\u003ev\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e with \u003ci\u003ev\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e, \u003ci\u003ev\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e with \u003ci\u003ev\u003c/i\u003e\u003csub\u003e3\u003c/sub\u003e,..., \u003ci\u003ev\u003c/i\u003e\u003csub\u003e\u003ci\u003eN\u003c/i\u003e-1\u003c/sub\u003e with \u003ci\u003ev\u003c/i\u003e\u003csub\u003e\u003ci\u003eN\u003c/i\u003e\u003c/sub\u003e.\u003cbr\u003eGiven a position in this game, and assuming both players play optimally, who will win?\u003cbr\u003e\u003cdiv align\u003d\"left\" style\u003d\"margin-top: 1.0em;\"\u003e\u003cb\u003eInput\u003c/b\u003e\u003c/div\u003eThe first line of input contains the integer \u003ci\u003eN\u003c/i\u003e, \u003cimg src\u003d\"CDN_BASE_URL/db3999c90c50b13a76fa955ef60d5803?v\u003d1715982602\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e.\u003cbr\u003eThe second line of input describes the current position. It contains \u003ci\u003eN\u003c/i\u003e digits without spaces. \u003ci\u003ei\u003c/i\u003e\u003csup\u003e\u003ci\u003eth\u003c/i\u003e\u003c/sup\u003e\u0026nbsp;digit describes the color of vertex \u003ci\u003ev\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e: 0\u0026nbsp;— uncolored, 1\u0026nbsp;— black, 2\u0026nbsp;— white. No two vertices of the same color are adjacent.\u003cbr\u003e\u003cdiv align\u003d\"left\" style\u003d\"margin-top: 1.0em;\"\u003e\u003cb\u003eOutput\u003c/b\u003e\u003c/div\u003eOn the only line of output, print \"\u003cpre style\u003d\"display: inline;font-size: 120.0%;\"\u003eFIRST\u003c/pre\u003e\" (without quotes) if the player moving first in that position wins the game, and \"\u003cpre style\u003d\"display: inline;font-size: 120.0%;\"\u003eSECOND\u003c/pre\u003e\" (without quotes) otherwise.\u003cbr\u003e"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n00100\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eSECOND\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\n1020\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eFIRST\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}