283 传统题

[CF1382B] 顺序 Nim 博弈 (Sequential Nim)

时间限制
1000ms
内存限制
256MiB
登顶 / 尝试
0/ 0
难度
2

[CF1382B] 顺序 Nim 博弈 (Sequential Nim)

Problem Statement

There are nn piles of stones in a line with a1,…,ana_1, \dots, a_n stones. Two players take turns removing any positive number of stones from the first non-empty pile. The player who cannot make a move loses. Determine the winner under optimal play.

Input

The first line contains tt (1≤t≤10001 \le t \le 1000). Each test case consists of nn (1≤n≤1051 \le n \le 10^5) followed by nn integers a1,…,ana_1, \dots, a_n (1≤ai≤1091 \le a_i \le 10^9). The sum of nn does not exceed 10510^5.

Output

Print "First" if the first player wins, otherwise "Second".

Example

7
3
2 5 4
8
1 1 1 1 1 1 1 1
6
1 2 3 4 5 6
6
1 1 2 1 2 2
1
1000000000
5
1 2 2 1 1
3
1 1 1
First
Second
Second
First
First
Second
First

Note

  • Constraints:1≤t≤10001 \le t \le 1000,1≤n≤1051 \le n \le 10^5,1≤ai≤1091 \le a_i \le 10^9,∑n≤105\sum n \le 10^5。
  • Source:Codeforces 1382B · Sequential Nim