Poker Nim is another $2$-player game that's a simple variation on a Nim game. The rules of the games are as follows:

The game starts with $n$ piles of chips indexed from $\mbox{0}$ to $n-1$. Each pile $\boldsymbol{i}$ (where $0\leq i<n$) has $c_i$ chips.

The players move in alternating turns. During each move, the current player must perform either of the following actions:

Remove one or more chips from a single pile. 
Add one or more chips to a single pile.     

At least $\mbox{1}$ chip must be added or removed during each turn.

To ensure that the game ends in finite time, a player cannot add chips to any pile $\boldsymbol{i}$ more than $\boldsymbol{\mbox{k}}$ times.
The player who removes the last chip wins the game.

Given the values of $n$, $\boldsymbol{\mbox{k}}$, and the numbers of chips in each of the $n$ piles, determine whether the person who wins the game is the first or second person to move. Assume both players move optimally.

Input Format

The first line contains an integer, $\mathbf{T}$, denoting the number of test cases. 

Each of the $2T$ subsequent lines defines a test case. Each test case is described over the following two lines:

Two space-separated integers, $n$ (the number of piles) and $\boldsymbol{\mbox{k}}$ (the maximum number of times an individual player can add chips to some pile $\boldsymbol{i}$), respectively.
$n$ space-separated integers, $c_0,c_1,\ldots,c_{n-1}$, where each $c_i$ describes the number of chips at pile $\boldsymbol{i}$.

Constraints

$1\leq T\leq100$
$1\le n,k\le100$
$1\leq c_i\leq10^9$

Output Format

For each test case, print the name of the winner on a new line (i.e., either $\textbf{First}$ or $\textbf{Second}$).

Sample Input
2
2 5
1 2
3 5
2 1 3

Sample Output
First
Second

Difficulty: EASY
Tags: Game theory

Starter code:

Solutions:
test = int(input())
for _ in range(test):
	(n, pile) = map(int, input().strip().split())
	ar = list(map(int, input().strip().split()))
	xor = 0
	for n in ar:
		xor = xor ^ n
	if xor == 0:
		print('Second')
	else:
		print('First')


for t in range(int(input())):
	n = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	s = 0
	for i in a:
		s ^= i
	if s == 0:
		print('Second')
	else:
		print('First')


def nim_sum(a, n):
	ans = 0
	for i in range(n):
		ans = ans ^ a[i]
	return ans
t = int(input())
while t != 0:
	t -= 1
	(n, k) = [int(i) for i in input().split()]
	a = [int(i) for i in input().split()]
	if nim_sum(a, n) != 0:
		print('First')
	else:
		print('Second')


for _ in range(int(input())):
	(n, a, b) = (input(), [int(i) for i in input().split()], 0)
	for j in a:
		b ^= j
	if b == 0:
		print('Second')
	else:
		print('First')


T = int(input())
for _ in range(T):
	(n, k) = map(int, input().split())
	c = map(int, input().split())
	r = 0
	for ci in c:
		r ^= ci
	print('First' if r else 'Second')


t = int(input())
for i in range(t):
	(n, k) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	b = 0
	for j in a:
		b ^= j
	if b == 0:
		print('Second')
	else:
		print('First')


from functools import reduce
for _ in range(int(input())):
	(n, k) = [int(x) for x in input().split(' ')]
	s = [int(x) for x in input().split(' ')]
	print('First' if reduce(lambda x, y: x ^ y, s) else 'Second')


from functools import reduce
T = int(input())
for i in range(T):
	input()
	print('First' if reduce(lambda x, y: x ^ y, [int(x) for x in input().split()]) else 'Second')


def nimsum_digit(piles):
	end_flag = True
	digit_sum = 0
	for (i, p) in enumerate(piles):
		digit_sum += p % 2
		piles[i] = p // 2
		if piles[i] > 0:
			end_flag = False
	return (digit_sum % 2, piles, end_flag)

def is_first_wins(piles):
	eflag = False
	while not eflag:
		(dsum, piles, eflag) = nimsum_digit(piles)
		if dsum:
			return True
	return False

def main():
	test_cases = int(input())
	for t in range(test_cases):
		input()
		piles = [int(x) for x in input().split(' ')]
		print('First' if is_first_wins(piles) else 'Second')
main()


t = int(input())
for _ in range(t):
	(n, k) = map(int, input().split())
	c = [int(x) for x in input().split()]
	r = 0
	for i in range(n):
		r = r ^ c[i]
	if r:
		print('First')
	else:
		print('Second')


for _ in range(int(input())):
	num_elements = input()
	arr = [int(i) for i in input().split()]
	xor = 0
	for j in arr:
		xor ^= j
	answer = 'Second' if xor == 0 else 'First'
	print(answer)


for _ in range(int(input())):
	input()
	x = 0
	for i in map(int, input().split()):
		x ^= i
	print('First' if x else 'Second')


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	chips = list(map(int, input().split()))
	p = 0
	for chip in chips:
		p ^= chip
	if p == 0:
		print('Second')
	else:
		print('First')


t = int(input())
for i in range(t):
	(n, a, b) = (input(), [int(i) for i in input().split()], 0)
	for j in a:
		b ^= j
	if b == 0:
		print('Second')
	else:
		print('First')


import sys

def solve(n, k, c):
	result = 0
	for i in c:
		result ^= i
	if result == 0:
		print('Second')
	else:
		print('First')
numcases = int(sys.stdin.readline())
for T in range(0, numcases):
	(n, k) = [int(elem) for elem in sys.stdin.readline().split()]
	c = [int(elem) for elem in sys.stdin.readline().split()]
	solve(n, k, c)


def input_int_list():
	return list(map(int, input().strip().split(' ')))

def nim_sum(seq):
	s = 0
	for i in seq:
		s ^= i
	return s
n = int(input().strip())
for i in range(n):
	(n, k) = input_int_list()
	c = input_int_list()
	if nim_sum(c) == 0:
		print('Second')
	else:
		print('First')


t = int(input())
for i in range(t):
	(n, k) = [int(x) for x in input().split(' ')]
	pile = {}
	amounts = input().split(' ')
	for i in range(n):
		pile[i] = int(amounts[i])
	sum = 0
	for i in range(n):
		sum ^= pile[i]
	if sum == 0:
		print('Second')
	else:
		print('First')


t = int(input().strip())
for i in range(t):
	(n, k) = input().strip().split(' ')
	(n, k) = (int(n), int(k))
	chips = [int(arr_temp) for arr_temp in input().strip().split(' ')]
	person = 0
	for i in chips:
		person ^= i
	if person == 0:
		print('Second')
	else:
		print('First')


import functools
import operator
g = int(input())
for _ in range(g):
	_ = input()
	xor_value = functools.reduce(operator.xor, [int(x) for x in input().split()])
	print('First' if xor_value != 0 else 'Second')


for _ in range(int(input())):
	(n, a, b) = (input(), [int(i) for i in input().split()], 0)
	for j in a:
		b ^= j
	if b == 0:
		print('Second')
	else:
		print('First')


from functools import reduce
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	piles = list(map(int, input().split()))
	if n == 1:
		print('First')
	elif max(piles) == 1:
		if n % 2 == 0:
			print('First')
		else:
			print('Second')
	elif reduce(lambda x, y: x ^ y, piles) == 0:
		print('Second')
	else:
		print('First')


T = int(input().strip())
for t in range(T):
	(n, k) = [int(i) for i in input().strip().split(' ')]
	c = [int(i) for i in input().strip().split(' ')]
	nim = 0
	for i in range(n):
		nim ^= c[i]
	if nim:
		print('First')
	else:
		print('Second')


t = int(input())
for _ in range(t):
	a = 0
	b = input()
	for i in input().split():
		a ^= int(i)
	if a:
		print('First')
	else:
		print('Second')


for _ in range(int(input())):
	(n, k) = map(int, input().strip().split())
	result = 0
	for val in input().strip().split():
		result ^= int(val)
	print('First' if result else 'Second')


g = int(input().strip())
for g0 in range(g):
	(n, k) = list(map(int, input().strip().split(' ')))
	l = list(map(int, input().strip().split(' ')))
	xor = 0
	for num in l:
		xor ^= num
	if xor == 0:
		print('Second')
	else:
		print('First')


t = int(input())
for a0 in range(t):
	(n, k) = map(int, input().split())
	c = []
	c[0:n] = map(int, input().split())
	a = 0
	for i in c:
		a = a ^ i
	if a == 0:
		print('Second')
	else:
		print('First')


def nim_poker(piles):
	xor = 0
	for p in piles:
		xor ^= p
	if xor == 0:
		return 'Second'
	return 'First'
games = int(input().strip())
for _ in range(games):
	(n, k) = [int(x) for x in input().strip().split()]
	piles = [int(x) for x in input().strip().split()]
	print(nim_poker(piles))


from functools import reduce
from operator import xor

def solve(stones, k):
	ans = reduce(xor, stones)
	return 'First' if ans else 'Second'

def main():
	for _ in range(int(input())):
		(n, k) = map(int, input().split())
		stones = list(map(int, input().split()))
		print(solve(stones, k))
main()


t = int(input())
for i in range(t):
	(n, k) = list(map(int, input().split(' ')))
	l = list(map(int, input().split(' ')))
	c = 0
	for j in range(n):
		c ^= l[j]
	c ^= k
	c ^= k
	if c == 0:
		print('Second')
	else:
		print('First')


from functools import reduce
g = int(input())
for i in range(g):
	(n, _) = (int(i) for i in input().split())
	l = [int(i) for i in input().split()]
	temp = reduce(lambda x, y: x ^ y, l)
	if temp == 0:
		print('Second')
	else:
		print('First')


from functools import reduce
from operator import xor
for _ in range(int(input().strip())):
	input()
	print('First' if reduce(xor, map(int, input().strip().split(' ')), 0) else 'Second')


from functools import reduce

def nim(p):
	res = reduce(lambda a, b: a ^ b, p)
	if res != 0:
		return 'First'
	return 'Second'
n = int(input().strip())
for i in range(n):
	(piles, swaps) = [int(val) for val in input().strip().split()]
	c = [int(val) for val in input().strip().split()]
	print(nim(c))


t = int(input())
for t0 in range(t):
	input()
	a = 0
	arr = map(int, input().strip().split())
	for x in arr:
		a ^= x
	print('Second' if a == 0 else 'First')


T = int(input())
for i in range(T):
	t = input().split()
	n = int(t[0])
	k = int(t[1])
	s = input().split()
	nim = list(map(int, s))
	nimsum = nim[0]
	for j in range(1, n):
		nimsum = nim[j] ^ nimsum
	if nimsum == 0:
		print('Second')
	else:
		print('First')


t = int(input())
while t != 0:
	t = t - 1
	(n, k) = map(int, input().split())
	a = [int(num) for num in input().split()]
	m = a[0]
	for i in range(1, len(a)):
		m = m ^ a[i]
	if m == 0:
		print('Second')
	else:
		print('First')


t = int(input())
for x in range(t):
	[n, k] = [int(y) for y in input().strip().split(' ')]
	a = [int(y) for y in input().strip().split(' ')]
	xor = 0
	for y in range(0, n):
		xor = xor ^ a[y]
	if xor == 0:
		print('Second')
	else:
		print('First')


for i in range(int(input())):
	(c, k) = [int(x) for x in input().split(' ')]
	n = list(map(int, input().split(' ')))
	anx = 0
	for x in n:
		anx ^= x
	if anx:
		print('First')
	else:
		print('Second')


T = int(input())
a = []
for i in range(T):
	t = input().split()
	n = int(t[0])
	k = int(t[1])
	s = input().split()
	nim = list(map(int, s))
	nimsum = nim[0]
	for j in range(1, n):
		nimsum = nim[j] ^ nimsum
	if nimsum == 0:
		a.append('Second')
	else:
		a.append('First')
for i in range(len(a)):
	print(a[i])


def winner(board, n, k):

	def nsum(i, val):
		s = 0
		for (j, x) in enumerate(board):
			if i == j:
				s ^= x + val
			else:
				s ^= x
		return s
	for i in range(n):
		for v in range(-board[i], k + 1):
			if nsum(i, v) == 0:
				return v != 0
	return False
n = int(input())
for i in range(n):
	(piles, k) = list(map(int, input().split()))
	board = list(map(int, input().split()))
	print('First' if winner(board, n, k) else 'Second')


from functools import reduce
from operator import xor
print(*('First' if reduce(xor, (input(), map(int, input().split()))[1], 0) else 'Second' for _ in range(int(input()))), sep='\n')


def firstWins(n, k, c):
	x = 0
	for num in c:
		x ^= num
	if x == 0:
		return False
	else:
		return True
t = int(input())
for iT in range(t):
	(n, k) = [int(_) for _ in input().strip().split()]
	c = [int(_) for _ in input().strip().split()]
	if firstWins(n, k, c):
		print('First')
	else:
		print('Second')


T = int(input())
for i1 in range(T):
	input()
	Arr = [int(m) for m in input().strip().split()]
	S = 0
	for i2 in Arr:
		S ^= i2
	print('Second') if S == 0 else print('First')


T = int(input())
for _ in range(T):
	(n, k) = input().strip().split(' ')
	(n, k) = (int(n), int(k))
	a = [int(x) for x in input().strip().split()]
	total = a[0]
	for i in range(1, n):
		total = total ^ a[i]
	if total == 0:
		print('Second')
	else:
		print('First')


t = int(input().strip())
for a0 in range(t):
	(n, r) = [int(temp_n) for temp_n in input().strip().split(' ')]
	piles = [int(temp_p) for temp_p in input().strip().split(' ')]
	k = 1
	while k < max(piles):
		k *= 2
	winSec = True
	while k > 0 and winSec:
		s = 0
		for (i, p) in enumerate(piles):
			if not k > p:
				piles[i] -= k
				s += 1
		if s % 2 == 1:
			winSec = False
		k = int(k / 2)
	if not winSec:
		print('First')
	else:
		print('Second')


g = int(input())
for _ in range(g):
	n = input()
	piles = list(map(int, input().split()))
	xored = 0
	for pile in piles:
		xored ^= pile
	print('Second' if xored == 0 else 'First')


for _ in range(int(input())):
	s = input().split()
	(n, k) = (int(s[0]), int(s[1]))
	arr = list(map(int, input().split()))
	ans = arr[0]
	for i in range(1, n):
		ans = ans ^ arr[i]
	if ans == 0:
		print('Second')
	else:
		print('First')


num = int(input())
for i in range(num):
	input()
	A = list(map(int, input().strip().split(' ')))
	count = A[0]
	for j in range(len(A)):
		if j > 0:
			count ^= A[j]
	if count == 0:
		print('Second')
	else:
		print('First')


T = int(input())
for t in range(T):
	(n, k) = [int(i) for i in input().split()]
	c = [int(i) for i in input().split()]
	nim_sum = 0
	for i in range(n):
		nim_sum ^= c[i]
	print('First' if nim_sum else 'Second')


q = int(input())
for _ in range(q):
	(n, k) = map(int, input().split())
	p = list(map(int, input().split()))
	sum = 0
	for i in p:
		sum = sum ^ i
	m = max(p)
	first = sum == 0 and m > 1
	print('First' if not first else 'Second')


import functools
misere = False

def xor_zero(piles):
	return functools.reduce(lambda x, y: x ^ y, piles) == 0
for _ in range(int(input())):
	(n, k) = list(map(int, input().strip().split(' ')))
	piles = list(map(int, input().strip().split(' ')))
	if misere and max(piles) == 1:
		if n % 2 == 1:
			print('Second')
		else:
			print('First')
	elif xor_zero(piles):
		print('Second')
	else:
		print('First')


T = int(input())
for t0 in range(T):
	(N, K) = (int(a) for a in input().split())
	A = [int(a) for a in input().split()]
	s = 0
	for a in A:
		s = s ^ a
	if s != 0:
		print('First')
	else:
		print('Second')


for _ in range(int(input())):
	(n, k) = list(map(int, input().strip().split(' ')))
	piles = list(map(int, input().strip().split(' ')))
	result = 0
	for i in range(n):
		pile = piles[i]
		result ^= pile
	if result == 0:
		print('Second')
	else:
		print('First')


from functools import reduce
T = int(input().strip())
for i in range(T):
	(n, k) = map(int, input().strip().split(' '))
	arr = [int(arr_temp) for arr_temp in input().strip().split(' ')]
	nimsum = reduce(lambda x, y: x ^ y, arr)
	if nimsum:
		print('First')
	else:
		print('Second')


for _ in range(int(input().strip())):
	[n, k] = map(int, input().strip().split())
	a = list(map(int, input().strip().split()))
	s = 0
	for i in a:
		s ^= i
	if s > 0:
		print('First')
	else:
		print('Second')


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	arr = list(map(int, input().split()))
	s = 0
	for i in arr:
		s = s ^ i
	print('Second' if s == 0 else 'First')


def get_input():
	return input()
T = int(get_input())
for i in range(T):
	(n, k) = [int(x) for x in get_input().split()]
	chips = [int(x) for x in get_input().split()]
	nim_sum = 0
	for value in chips:
		nim_sum ^= value
	if nim_sum != 0:
		print('First')
	else:
		print('Second')


t = int(input().strip())
for i in range(t):
	(n, k) = [int(temp) for temp in input().strip().split(' ')]
	c = [int(temp) for temp in input().strip().split(' ')]
	score = 0
	for ctemp in c:
		score ^= ctemp
	if score == 0:
		print('Second')
	else:
		print('First')


T = int(input())
for _ in range(T):
	(N, K) = map(int, input().split())
	V = map(int, input().split())
	nr_xor = 0
	for val in V:
		nr_xor ^= val
	print(['Second', 'First'][nr_xor > 0])


t = int(input())
for l in range(t):
	(n, k) = map(int, input().split())
	li = list(map(int, input().split()))
	s = li[0]
	for i in range(1, n):
		s = s ^ li[i]
	if s != 0:
		print('First')
	else:
		print('Second')


for i in range(int(input())):
	n = input()
	a = []
	a[:] = map(int, input().split())
	p = 0
	for j in a:
		p = p ^ j
	print('First') if p > 0 else print('Second')


t = int(input())
while t > 0:
	(n, k) = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	ans = 0
	for ele in c:
		ans ^= ele
	if ans == 0:
		print('Second')
	else:
		print('First')
	t -= 1


t = int(input())
for ti in range(t):
	(n, k) = [int(s) for s in input().split()]
	c = [int(s) for s in input().split()]
	s = 0
	for i in c:
		s ^= i
	if s == 0:
		print('Second')
	else:
		print('First')


output_buffer = list()
from functools import reduce
from operator import xor
g = int(input())
for _ in range(g):
	(n, k) = input().split()
	(n, k) = (int(n), int(k))
	s = list(map(int, input().split()))
	winning = reduce(xor, s) > 0
	output_buffer.append('First' if winning else 'Second')
print('\n'.join(output_buffer))


from functools import reduce
from operator import xor
for _ in range(int(input())):
	input()
	nim = (int(x) for x in input().split())
	print('First' if reduce(xor, nim) else 'Second')


g = int(input())
for gi in range(g):
	(n, k) = input().strip().split(' ')
	(n, k) = (int(n), int(k))
	a = [int(ai) for ai in input().strip().split(' ')]
	x = 0
	ans = ['Second', 'First']
	for i in range(0, n):
		x = x ^ a[i]
	if x == 0:
		print(ans[0])
	else:
		print(ans[1])


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	a = list(map(int, input().split()))
	ans = 0
	for i in a:
		ans ^= i
	if ans == 0:
		print('Second')
	else:
		print('First')


def iin():
	return int(input().strip())

def lstin():
	return list(map(int, input().strip().split()))
for _ in range(iin()):
	input()
	res = 0
	for s in lstin():
		if s > 0:
			res ^= s
	print('First' if res else 'Second')


t = int(input().strip())
for t_0 in range(t):
	(n, k) = [int(i) for i in input().strip().split(' ')]
	sum1 = int(0)
	s = [int(i) for i in input().strip().split(' ')]
	for i in s:
		sum1 ^= i
	if sum1 == 0:
		print('Second')
	else:
		print('First')


from functools import reduce
for _ in range(int(input())):
	__ = input()
	print('First' if reduce(lambda x, y: x ^ y, list(map(int, input().split())), 0) else 'Second')


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	chips = list(map(int, input().split()))
	b = 0
	for c in chips:
		b ^= c
	if b == 0:
		print('Second')
	else:
		print('First')


T = int(input())
for _ in range(T):
	input()
	total = 0
	for num in input().split():
		total ^= int(num)
	if total == 0:
		print('Second')
	else:
		print('First')


def parseInput(f):
	return [f(x) for x in input().split()]
t = int(input())
for _ in range(t):
	(n, k) = parseInput(int)
	arr = parseInput(int)
	x = 0
	for i in range(n):
		x ^= arr[i]
	print('First' if x != 0 else 'Second')


q = int(input().strip())
for _ in range(q):
	(n, k) = map(int, input().strip().split())
	piles = [int(num) for num in input().strip().split()]
	previous = piles[0]
	for i in range(1, len(piles)):
		previous ^= piles[i]
	if previous == 0:
		print('Second')
	else:
		print('First')


T = int(input().strip())
for i in range(T):
	n = int(input().strip().split()[0])
	result = 0
	array = [int(x) for x in input().split()]
	for c in array:
		result ^= c
	if result == 0:
		print('Second')
	else:
		print('First')


import functools
import operator

def xor_sum(iterable):
	return functools.reduce(operator.xor, iterable, 0)
for _ in range(int(input())):
	input()
	print('First' if xor_sum(map(int, input().split())) else 'Second')


for i in range(int(input())):
	(n, k) = list(map(int, input().split()))
	k = 0
	for j in input().split():
		k ^= int(j)
	if k == 0:
		print('Second')
	else:
		print('First')


for _ in range(int(input())):
	(n, a, b) = (input(), [int(i) for i in input().split()], 0)
	for j in a:
		b ^= j
	if b == 0:
		print('Second')
	else:
		print('First')


for _ in range(int(input())):
	(n, a, b) = (list(input()), [int(i) for i in input().split()], 0)
	for j in a:
		b ^= j
	if b == 0:
		print('Second')
	else:
		print('First')


import sys

def solve(aa, k):

	def nimsum(aa):
		ns = 0
		for a in aa:
			ns ^= a
		return ns
	ns = nimsum(aa)
	ones = aa.count(1)
	l = len(aa)
	print('ns=%d k=%d l=%d ones=%d aa=%s' % (ns, k, l, ones, aa), file=sys.stderr)
	if len(aa) == 1:
		return True
	if ns > 0:
		return True
	return ones == len(aa) and (len(aa) + k * len(aa)) % 2
t = int(input())
for _ in range(t):
	(_, k) = map(int, input().split())
	aa = list(map(int, input().split()))
	if solve(aa, k):
		print('First')
	else:
		print('Second')


for _ in range(int(input())):
	(_, k) = list(map(int, input().split()))
	result = 0
	for i in map(int, input().split()):
		result ^= i
	print('First') if result is not 0 else print('Second')


def poker_nim(n, k, nim):
	nimsum = nim[0]
	for j in range(1, n):
		nimsum = nim[j] ^ nimsum
	return 'Second' if nimsum == 0 else 'First'
T = int(input())
for i in range(T):
	(n, k) = map(int, input().split())
	nim = list(map(int, input().split()))
	print(poker_nim(n, k, nim))


def poker_nim(n, k, piles):
	ans = 0
	for p in piles:
		ans ^= p
	if ans == 0:
		return False
	return True

def main():
	t = int(input())
	for _ in range(t):
		(n, k) = map(int, input().split())
		piles = list(map(int, input().split()))
		print('First' if poker_nim(n, k, piles) else 'Second')
main()


T = int(input().strip())

def exor(s):
	a = 0
	for i in s:
		a = a ^ i
	return a
for t in range(T):
	[n, k] = list(map(int, input().strip().split(' ')))
	piles = list(map(int, input().strip().split(' ')))
	if exor(piles) == 0:
		print('Second')
	else:
		print('First')


for i in range(int(input())):
	g = 0
	input()
	for j in map(int, input().split()):
		g ^= j
	print('First' if g else 'Second')


def solve(cs):
	nim_sum = 0
	for c in cs:
		nim_sum ^= c
	return 'First' if nim_sum != 0 else 'Second'
T = int(input())
for _ in range(T):
	(n, k) = [int(v) for v in input().split(' ')]
	cs = [int(c) for c in input().split(' ')]
	print(solve(cs))


for _ in range(int(input().strip())):
	(n, k) = map(int, input().split())
	ls = list(map(int, input().split()))
	x = 0
	for i in ls:
		x = x ^ i
	if x == 0:
		print('Second')
	else:
		print('First')


from functools import reduce
T = int(input())
for _ in range(T):
	(n, k) = map(int, input().split(' '))
	c = [int(c_temp) for c_temp in input().split(' ')]
	poker = reduce(lambda a, b: a ^ b, c)
	print('Second' if poker == 0 else 'First')


def nim(l):
	l_ = list((str(bin(b)[2:].zfill(7)) for b in l))
	i = 0
	re = 'Second'
	while True:
		if list((a[i] for a in l_)).count('1') % 2 == 1:
			re = 'First'
			break
		elif i >= 6:
			break
		else:
			i += 1
	print(re)
g = int(input())
for i in range(g):
	(n, k) = input().split()
	s = list(map(int, input().split()))
	nim(s)


from functools import reduce
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	c = list(map(int, input().split()))
	if reduce(lambda i, j: i ^ j, c) > 0:
		print('First')
	else:
		print('Second')


from functools import reduce
import operator
for _ in range(int(input())):
	(n, k) = map(int, input().strip().split(' '))
	vals = list(map(int, input().strip().split(' ')))
	if reduce(operator.xor, vals):
		print('First')
	else:
		print('Second')


t = int(input())
for _ in range(t):
	(n, k) = map(int, input().split())
	s = map(int, input().split())
	x = 0
	for d in s:
		x ^= d
	print('First' if x else 'Second')


import functools

def check_winner(heaps):
	is_misere = False
	if is_misere and is_near_endgame(heaps):
		moves_left = sum((1 for x in heaps if x > 0))
		is_odd = moves_left % 2 == 1
		sizeof_max = max(heaps)
		if sizeof_max == 1 and is_odd:
			print('Second')
		else:
			print('First')
		return
	if nim_sum(heaps):
		print('First')
	else:
		print('Second')

def is_near_endgame(heaps):
	is_near_endgame = False
	count_non_0_1 = sum((1 for x in heaps if x > 1))
	return count_non_0_1 <= 1

def nim_sum(heaps):
	return functools.reduce(lambda x, y: x ^ y, heaps)
T = int(input().strip())
for i in range(T):
	(N, K) = list(map(int, input().strip().split()))
	ARR = list(map(int, input().strip().split()))
	check_winner(ARR)


def x(A):
	s = 0
	for a in A:
		s ^= a
	return s
for _ in range(int(input())):
	(m, n) = input().split()
	(m, n) = (int(m), int(n))
	A = [int(k) for k in input().split()]
	if x(A) == 0:
		print('Second')
	else:
		print('First')


n = int(input().strip())
for i in range(n):
	a = [int(x) for x in input().strip().split()]
	b = [int(x) for x in input().strip().split()]
	x = 0
	for j in range(a[0]):
		x ^= b[j]
	print('Second' if x == 0 else 'First')


t = int(input())
for _ in range(t):
	(n, a, b) = (input(), [int(i) for i in input().split()], 0)
	for j in a:
		b ^= j
	if b == 0:
		print('Second')
	else:
		print('First')


def playerOneWins(n, k, c):
	x = 0
	for c_i in c:
		x = x ^ c_i
	if x == 0:
		return False
	return True

def main():
	t = int(input())
	for _ in range(t):
		(n, k) = map(int, input().split())
		c = list(map(int, input().split()))
		print('First' if playerOneWins(n, k, c) else 'Second')
main()


import sys

def pokerNim(k, c):
	ones = [1] * len(c)
	xor = 0
	if c == ones:
		if sum(c) % 2 == 0:
			return 'Second'
		else:
			return 'First'
	else:
		for i in c:
			xor ^= i
	if xor == 0:
		return 'Second'
	else:
		return 'First'
t = int(input().strip())
for a0 in range(t):
	(n, k) = input().strip().split(' ')
	(n, k) = [int(n), int(k)]
	c = list(map(int, input().strip().split(' ')))
	result = pokerNim(k, c)
	print(result)


import sys

def pokerNim(k, c):
	if c == []:
		return 1
	else:
		sum = 0
		for pile in c:
			sum ^= pile
		return sum == 0
t = int(input().strip())
for a0 in range(t):
	(n, k) = input().strip().split(' ')
	(n, k) = [int(n), int(k)]
	c = list(map(int, input().strip().split(' ')))
	result = pokerNim(k, c)
	if result == 0:
		print('First')
	if result == 1:
		print('Second')


T = int(input())
l1 = []
l2 = []
list = []
for i in range(T):
	(n, k) = map(int, input().split(' '))
	l1.append(n)
	l2.append(k)
	l3 = [int(i) for i in input().split(' ')]
	list.append(l3)
for i in range(T):
	n = l1[i]
	l = list[i]
	nim_sum = 0
	for j in range(n):
		nim_sum = l[j] ^ nim_sum
	if nim_sum == 0:
		print('Second')
	else:
		print('First')