Problem:
 Score : 500 points    Problem Statement There is an apple tree that bears apples of N colors. The N colors of these apples are numbered 1 to N , and there are a_i apples of Color i .  You and Lunlun the dachshund alternately perform the following operation (starting from you):   Choose one or more apples from the tree and eat them. Here, the apples chosen at the same time must all have different colors.   The one who eats the last apple from the tree will be declared winner. If both you and Lunlun play optimally, which will win?      Constraints  1 \leq N \leq 10^5  1 \leq a_i \leq 10^9  All values in input are integers.         Input Input is given from Standard Input in the following format:  N  a_1  a_2  :  a_N       Output If you will win, print first ; if Lunlun will win, print second .        Sample Input 1 2
1
2      Sample Output 1 first  Let Color 1 be red, and Color 2 be blue. In this case, the tree bears one red apple and two blue apples.  You should eat the red apple in your first turn. Lunlun is then forced to eat one of the blue apples, and you can win by eating the other in your next turn.  Note that you are also allowed to eat two apples in your first turn, one red and one blue (not a winning move, though).       Sample Input 2 3
100000
30000
20000      Sample Output 2 second

Solution (Python):
N = int(input())
ans = 'second'
for _ in range(N):
    if int(input())%2 == 1:
        ans = 'first'
        
print(ans)

Solution (Python):
N = int(input())
a = [int(input()) for _ in range(N)]
for i in range(N):
    if a[i]%2 == 1:
        print("first")
        exit()
print("second")

Solution (Python):
N = int(input())
a = [int(input()) for i in range(N)]

print("first" if any(map(lambda x: x % 2 == 1, a)) else "second")

Solution (Python):
n=int(input())
a=[0]*n
for i in range(n):
  a[i]=int(input())
print("second" if all([A%2==0 for A in a]) else "first")

Solution (Python):
N=int(input())
for i in range(N):
  A=int(input())
  if A%2==1:
    print("first")
    exit()
print("second")

Solution (Python):
N=int(input())
print('second' if all(int(input()) % 2 == 0 for _ in range(N)) else 'first')

Solution (Python):
from operator import itemgetter
from itertools import *
from bisect import *
from collections import *
from heapq import *
from fractions import Fraction
import sys

sys.setrecursionlimit(10 ** 6)

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

for _ in range(II()):
    if II()&1:
        print("first")
        exit()
print("second")

Solution (Python):
n = int(input())
e = 0
for i in range(n):
    x = int(input())
    if x%2 == 0:
        e += 1
if n != e:
    print("first")
else:
    print("second")

Solution (Python):
import sys
input = sys.stdin.readline

n = int(input())
A = [int(input()) for i in range(n)]

sec = 1
for i in range(n):
    if A[i] % 2 == 1:
        sec = 0
if sec == 1:
    print("second")
else:
    print("first")

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10
    

def solve():
    n = II()
    a = IR(n)
    if sum(map(lambda x: x & 1, a)):
        print("first")
    else:
        print("second")
    return



if __name__ == '__main__':
    solve()

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]
c = 0
for i in a:
    c += i % 2
print("first" if c >= 1 else "second")

Solution (Python):

import sys

FIRST = "first"
SECOND = "second"

def solve(N: int, a: "List[int]"):
    for i in range(N):
        if a[i]%2 == 1:
            print(FIRST)
            return
    print(SECOND)

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    a = [int(next(tokens)) for _ in range(N)]  
    solve(N, a)

if __name__ == '__main__':
    main()

Solution (Python):
a=[]
for i in range(int(input())):
    a+=[int(input())]
print(['first','second'][all([i%2==0 for i in a])])

Solution (Python):
n=int(input())
a=[-1]*n
for i in range(n):a[i]=int(input())  
print('second' if all(a[i] % 2 == 0 for i in range(n)) else 'first')

Solution (Python):
n=int(input())
a=[-1]*n
for i in range(n):
  a[i]=int(input())
  

def all_even(li):
  for i in li:
    if i%2!=0:
      return False
  return True


if all_even(a):
  print("second")
else:
  print("first")

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n=int(input())
A=[int(input()) for i in range(n)]
print("first" if not all(ai % 2 == 0 for ai in A) else "second")

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
print("second" if all(A[i] % 2 == 0 for i in range(N)) else "first")

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
flag = 0
for i in range(N):
    if A[i]%2==1:
        flag = 1
        break
if flag==1:
    print("first")
else:
    print("second")

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
A = [0]*N
for i in range(N):
    A[i] = int(stdin.readline().rstrip())

if all([i % 2 == 0 for i in A]):
    print("second")
else:
    print("first")

Solution (Python):
N=int(input())
A=[int(input())%2 for _ in range(N)]
print(['first','second'][sum(A)==0])

Solution (Python):
n=int(input())
a=[int(input()) for i in range(n)]
print('second' if all(a[i]%2==0 for i in range(n)) else 'first')

Solution (Python):
n=int(input())
a=[int(input()) for i in range(n)]

for i in range(n):
    if a[i]%2!=0:
        print('first')
        break
else:
    print('second')

Solution (Python):
n = int(input())

for i in range(n):
    a = int(input())
    if a%2 == 1:
        print('first')
        break

    if i == n-1:
        print('second')

Solution (Python):
N=int(input())
for i in range(N):
    a=int(input())

    if a % 2 == 1:
        print('first')
        break

    elif i==N-1:
        print('second')
    
    else:
        continue

Solution (Python):
n,*a=map(int,open(0));print("sfeicrosntd"[any(v%2for v in a)::2])

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

N = int(input())
A = [int(input()) for _ in range(N)]
answer = 'first' if any(x&1 for x in A) else 'second'
print(answer)

Solution (Python):
import sys
N=int(input())

for i in range(N):
  if int(input())%2==1:
    print("first")
    sys.exit()

print("second")

Solution (Python):
n = int(input())
l = [int(input()) for i in range(n)]
fl = True
for i in l:
    fl&=(i%2==0)
if fl:
    print('second')
else:
    print('first')

Solution (Python):
ans = "second"
for _ in range(int(input())):
    if int(input()) % 2 == 1:
        ans = "first"
print(ans)

Solution (Python):
print('sfeicrosntd'[any([int(i)%2for i in open(0)][1:])::2])

Solution (Python):
def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    if all([a % 2 == 0 for a in A]):
        print("second")
    else:
        print("first")


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())

for i in range(n):
    a = int(input())
    if a % 2 == 1:
        print('first')
        break
else:
    print('second')

Solution (Python):
n=int(input())
a=[]
flag=0
for i in range(n):
    num=int(input())
    a.append(num)
print( "second"  if all(a[i]%2==0 for i in range(n)) else "first" )

Solution (Python):
import sys
input=sys.stdin.readline
n=int(input())
A=[int(input()) for _ in range(n)]
for a in A:
    if a%2:
        print('first')
        break
else:
    print('second')

Solution (Python):
n = int(input())
a = [int(input()) for i in range(n)]
flag = 0
for i in a:
  if i%2:
    flag = 1
    break
if flag == 0:print('second')
else:print('first')

Solution (Python):
import math,sys
def main():
    n = int(input())
    for i in range(0,n):
        if int(sys.stdin.readline()) % 2 == 1:
            print('first')
            sys.exit()
    print('second')

main()

Solution (Python):

N = int(input())
a = [int(input()) for i in range(N)]
f = 'second'
for i in a:
    if i%2 == 1:
        f = 'first'
print(f)

Solution (Python):
n=int(input())
arr=[]
for _ in range(n):
    arr+=[int(input())]
found=False
for num in arr:
    if num%2==1:
        found =True
        break
if found:
    print('first')
else:print('second')

Solution (Python):
n = int(input())
A = [int(input()) for i in range(n)]

ans = 'second'
for i in range(n):
    if A[i] % 2 == 1:
        ans = 'first'
        break
        
print(ans)

Solution (Python):
n = int(input())
A = [int(input()) for i in range(n)]

if all(a % 2 == 0 for a in A):
    print('second')
else:
    print('first')

Solution (Python):
a = int(input())
k = 0
for i in range(a):
    b = int(input())
    if b%2!=0:
        k = 1
if k != 1:
    print("second")
else:print("first")

Solution (Python):
oddcnt = 0
for i in range(input()):
    if input()%2:
        oddcnt += 1
if oddcnt:
    print "first"
else:
    print "second"

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]

if all(A[i]%2==0 for i in range(N)):
    print("second")
else:
    print("first")

Solution (Python):

"""
Created on Tue Jan  1 12:22:07 2019

@author: Yamazaki Kenichi
"""

N = int(input())
a = [int(input()) for i in range(N) ]

for i in range(N):
    if a[i] % 2 == 0:
        ans = 'second'
    else:
        ans = 'first'
        break

print(ans)

Solution (Python):
n = int(input())
A = [int(input()) for i in range(n)]
ans = 'first'

if all(i % 2 == 0 for i in A):
    ans = 'second'
        
print(ans)

Solution (Python):
import sys

def main():
    n = int(input())
    
    def mod2(str_n):
        return int(str_n) % 2

    has_odd = any(map(mod2, sys.stdin.readlines()))

    if has_odd:
        print('first')
    else:
        print('second')
    return


main()

Solution (Python):
n = int(input())
a = [int(input()) for i in range(n)]

print("second" if all(i%2 == 0 for i in a) else "first")

Solution (Python):
N = int(input())

res = 'second'

for _ in range(N):
    a = int(input())
    if a % 2 == 1:
        res = 'first'

print(res)

Solution (Python):
N = int(input())
a = [int(input()) for _ in range(N)]
if all(list(map(lambda x: x%2==0, a))):
  print("second")
else:
  print("first")

Solution (Python):
N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))


for a in A:
    if a % 2 == 1:
        
        print("first")
        exit()

print("second")

Solution (Python):
N = int(input())

for i in range(N):
    n = int(input())
    if n % 2 == 1:
        print("first")
        break
else:
    print("second")

Solution (Python):
import sys

input = sys.stdin.readline
N = int(input())
A = [int(input()) for _ in range(N)]
ans = ["first", "second"]
c = 0
for a in A:
    if a % 2 == 1:
        print(ans[0])
        exit()
print(ans[1])

Solution (Python):
c = 0
for i in [0]*int(input()):
  c += int(input())%2
print("sfeicrosntd"[min(c,1)::2])

Solution (Python):
c = 0
for i in [0]*int(input()):
  c = max(c,int(input())%2)
print("sfeicrosntd"[c::2])

Solution (Python):
N = int(input())
for i in range(N):
    a = int(input())
    if a % 2 == 1:
        print("first")
        exit()
print("second")

Solution (Python):
n=int(input())
print(["second","first"][any([int(input())%2 for i in range(n)])])

Solution (Python):
print("second" if all([int(input()) % 2 == 0 for _ in range(int(input()))]) else "first")

Solution (Python):
import sys
readline = sys.stdin.readline
from itertools import product
def solve():
    for _ in range(int(input())):
        if int(readline()) & 1:
            return "first"
    return "second "
print(solve())

Solution (Python):
def solve():
    for _ in range(int(input())):
        if int(input()) & 1:
            return "first"
    return "second "
print(solve())

Solution (Python):
N = int(input())
An = []
for p in range(N):
    Ai = int(input())
    An.append(Ai)
res = True
for i in An:
    if i % 2 != 0:
        res = False
print("second" if res else "first")

Solution (Python):
N = int(input())
cnt = 0
for i in range(N):
    if int(input()) % 2 != 0:
        cnt += 1
        exit

if cnt == 0:
    print("second")
else:
    print("first")

Solution (Python):
N = int(raw_input())
a = []
for i in range(N):
   a.append(int(raw_input()))
print('second' if all(a[i] % 2 == 0 for i in range(N)) else 'first')

Solution (Python):










N = int(input())
ans = 'second'
for i in range(0, N):
    a = int(input())
    if a % 2 == 1:
        ans = 'first'
        break
print("{}".format(ans))

Solution (Python):










N = int(input())
ans = 'second'
for i in range(0, N):
    a = int(input())
    if a % 2 == 1:
        ans = 'first'
print("{}".format(ans))

Solution (Python):
n =int(input())
for i in range(n):
    m = int(input())
    if m%2 == 1:
        print('first')
        exit()
print('second')

Solution (Python):
import sys
n = int(input())
for i in range(n):
  if int(input()) % 2 == 1:
    print("first")
    sys.exit()
print("second")

Solution (Python):
n = int(input())
ans = False
for _ in range(n):
  i = int(input())
  if i % 2 == 1:
    ans = True
    break
if ans:
  print('first')
else:
  print('second')

Solution (Python):
n = int(raw_input())

answer = "second"

for i in xrange(n):
    a = int(raw_input())
    if not a % 2 == 0:
        answer = "first"

print answer

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]

if(all(a%2 == 0 for a in A)):
  print("second")
else:
  print("first")

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]

if all(A[i] % 2 == 0 for i in range(N)):
    print("second")
else:
    print("first")

Solution (Python):
n=int(input())
array=[]
for i in range(n):
    array.append(int(input()))
cnt=0
for i in range(n):
    if array[i]%2==0:
        cnt+=1
if(cnt==len(array)):
    print("second")
else:
    print("first")

Solution (Python):
N = int(input())
a = [int(input()) for i in range(N)]
print('second' if all(a[i] % 2 == 0 for i in range(N)) else 'first')

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]

result = False
for a in A:
    if a % 2 == 1:
        result = True

if result:
    print("first")
else:
    print("second")

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]
print("second" if all(i%2==0 for i in a) else "first")

Solution (Python):
n = int(input())
d = [int(input()) for _ in range(n)]
flag = True
for i in d:
    if i % 2:
        print("first")
        exit(0)
print("second")

Solution (Python):
n = int(input())
for _ in range(n):
  if int(input())%2==1:
    print('first')
    break
else:
  print('second')

Solution (Python):
t = int(input())

count = 0

for i in range(t):
    a = int(input())
    if a %2 == 1:
        count += 1
        
if count > 0:
    print("first")
    
else:
    print("second")

Solution (Python):
n=int(input())
arr=[]
for i in range(n):
	x=int(input())
	arr.append(x)
for x in arr:
	if x%2!=0:
		print("first")
		exit()
print("second")

Solution (Python):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

print('second' if all(a[i] % 2 == 0 for i in range(n)) else 'first')

Solution (Python):
n = int(input())
t = [int(input()) for i in range(n)]
if all(elem % 2 == 0 for elem in t) == True:
  print("second")
else:
  print("first")

Solution (Python):


"""
本番終了後、ちょっと修正版
"""

N = int(input())

if all([int(input()) % 2 == 0 for i in range(N)]):
    print('second')
else:
    print('first')

Solution (Python):
n = int(input())
a = [int(input()) for _ in range(n)]

print('second' if all(a[i] % 2 == 0 for i in range(n)) else 'first')

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]
for i in A:
    if i % 2 != 0:
        print('first')
        break
else:
    print('second')

Solution (Python):
n = int(input())
A = [int(input()) for _ in range(n)]

print("first" if any(a % 2 == 1 for a in A) else "second")

Solution (Python):
n = int(input())
a = [int(input()) for i in range(n)]
print('second' if all(a[i] % 2 == 0 for i in range(n)) else 'first')

Solution (Python):
N = int(input())
A = []
all_even = True
for _ in range(N):
    if int(input()) % 2 != 0:
        all_even = False

print('second' if all_even else 'first')

Solution (Python):
n=int(input())
a=[int(input())%2 for i in range(n)]
if sum(a)==0:print('second')
else:print('first')

Solution (Python):
N = int(input())
As = []
for i in range(N):
    As.append(int(input()))
        

print("second" if all(a % 2 == 0 for a in As) else "first")

Solution (Python):
N = int(input())
a = [int(input()) for _ in range(N)]

if all(map(lambda x: x % 2 == 0, a)):
    print("second")
else:
    print("first")

Solution (Python):
n=int(input())
A=[int(input()) for i in range(n)]
for i in A:
  if i%2==1:
    print('first')
    exit()
print('second')

Solution (Python):
n = int(input())
a_list = []
for i in range(n):
    a_list.append(int(input()))
count = 0
for item in a_list:
  if item%2 == 0:
    count += 1
if count == n:
  print("second")
else:
  print("first")

Solution (Python):
N = int(input())

flag = False

for i in range(N):
    
    a = int(input())

    if a % 2 != 0:
        flag = True

if flag:
    print('first')
else:
    print('second')

Solution (Python):
A = int(input())
ls = [int(input())%2 for i in range(A)]
if ls.count(1) != 0:
    print("first")
else:
    print("second")

Solution (Python):
import sys
N=input()

for i in range(N):
	x=int( sys.stdin.readline() )
	if x%2==1:
		print "first"
		quit()
else:
	print "second"

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
print("first" if any(x % 2 for x in A) else "second")

Solution (Python):
n = int(input())
a_list = [int(input()) for _ in range(n)]

print('second' if all(a_list[i] % 2 == 0 for i in range(n)) else 'first')

Solution (Python):
N = int(input())
cnt = 0
for i in range(0, N):
    if int(input()) % 2 == 1:
        cnt = cnt + 1

if cnt > 0:
    print('first')
else:
    print('second')

Solution (Python):
n=int(input())
c=[int(input())%2 for i in range(n)]
print("first"if sum(c)>0 else "second")

Solution (Python):
n = int(input())
a = [int(input()) for i in range(n)]
print('second' if all(a[i] % 2 == 0 for i in range(n)) else 'first')

Solution (Python):
import sys

input = sys.stdin.readline
n = int(input())
a_list = []
cnt = 0
for _ in range(n):
    a = int(input())
    if a % 2 == 0:
        cnt += 1
if cnt == n:
    print('second')
else:
    print('first')

Solution (Python):
N = int(input())
ais = []
for i in range(N):
    ais.append(int(input()))
bis = list(map(lambda x: x%2, ais))
if bis==[0]*N:
    print("second")
else:
    print("first")

Solution (Python):
N = int(input())
a = [int(input()) % 2 for _ in range(N)]
print("first" if sum(a) > 0 else "second")

Solution (Python):
N = int(input())
a = [int(input()) % 2 for _ in range(N)]
res = sum(a)
print("first" if res > 0 else "second")

Solution (Python):
n=int(input())
flag=0
for i in range(n):
  a=int(input())
  if a%2==1:
    flag=1
    break
  else:
    pass
if flag==1:
  print('first')
else:
  print('second')

Solution (Python):


if __name__ == '__main__':
    num = int(input())
    

    ans = 0
    count_e, count_o = 0, 0
    for i in range(num):
        data = input()
        if int(data[-1]) % 2 == 1:
            count_o += 1
            break
        
        
    
    
    
    
    
    
    
    
    
    if count_o % 2 == 0:
        print('second')
    else:
        print('first')

Solution (Python):
N = int(input())
a = 0
for i in range(N):
    a += int(input())%2
 
if a > 0:
    print("first")
else:
    print("second")

Solution (Python):
n =int(input())
a = int(input())
b =[a]
v = 0
if a == 1:
    v = 1
if a%2 ==1:
    ans = 1
else:
    ans = -1
    q = 1
for i in range(1,n):
    a = int(input())
    b.append(a)
    if a == 1:
        v =1
    if a%2==1:
        v= 1
if ans == 1 or v == 1:
   print('first')
else:
    print('second')

Solution (Python):
import numpy as np

N = int(input())
a = np.array([int(input()) for i in range(N)])
max_val = np.max(a)

max_val_even = np.all(max_val%2==0)
max_val_odd = np.all(max_val%2!=0)
N_even = np.all(N%2==0)
N_odd = np.all(N%2!=0)
all_even = np.all(a%2==0)
all_odd = np.all(a%2!=0)

if max_val_odd:
  print("first")
else:
	if all_even:
	  	print("second")
	else:
 		print("first")

Solution (Python):
N=  int(input())
c= True
for i in range(N):
    if int(input()) % 2 == 1:
        c = False

if c:
    print("second")
else:
    print("first")

Solution (Python):
n=int(input())
l=[int(input()) for i in range(n)]

a=0
for i in range(n):
    if l[i]%2==1:
        print('first')
        exit()
    a+=l[i]
    a%=2
if a==1:
    print('first')
else:
    print('second')

Solution (Python):
n=int(input())
a=[]
count=0
for i in range(n):
    a.append(int(input()))
    count+=a[i]
    if a[i]%2==1:
        count=1
        break
if count%2==0:
    print("second")
else:
    print("first")

Solution (Python):
N = int(input())
A = []
Even_count = 0
for i in range(N):
    a = int(input())
    if a % 2 == 0:
        Even_count += 1
    A.append(a)
if Even_count == N:
    print("second")
else:
    print("first")

Solution (Python):
N = int(input())
mp = {}
for _ in range(N):
    i = int(input())
    mp[i] = mp.get(i, 0) + 1
for i in mp.keys():
    if i % 2 == 1:
        print('first')
        exit()
print('second')

Solution (Python):
N = int(input())
a = [int(input()) for x in range(N)]

anslist = [0 if x%2==0  else 1 for x in a]
if sum(anslist) > 0:
    print("first")
else:
    print("second")

Solution (Python):
N = int(input())
a = []
for _ in range(N):
    a.append(int(input())%2)
if sum(a) == 0:
    print('second')
else:
    print('first')

Solution (Python):
n = int(input())
aa = [int(input()) for _ in range(n)]
total = all([a % 2 == 0 for a in aa])
if total:
    print('second')
else:
    print('first')

Solution (Python):
"""
勝利条件
    最後のリンゴを取る
    1種類で2個のリンゴを残す
    2種類で2個2個のリンゴを残す
    3種類で2個2個2個のリンゴを残す

    1種類で4個のリンゴを残す
    2種類で4個4個のリンゴを残す


    全種類のリンゴを偶数にするゲーム
    全種類のリンゴが偶数じゃない場合は勝てるゲーム
    1つでも奇数があれば勝てるゲーム
    
"""

n = int(input())
a = [int(input()) % 2 != 0 for _ in range(n)]  

if any(a):
    print("first")
else:
    print("second")

Solution (Python):
N = int(input())
a = 0
for i in range(N):
    a += int(input())%2

if a > 0:
    print("first")
else:
    print("second")

Solution (Python):
N = int(input())
a = [0 for i in range(N)]
for i in range(N):
    a[i] = int(input())
dp = [0 for i in range(N + 1)]
dp[0] = 0
for i in range(N):
    dp[i + 1] = (dp[i] + a[i]) % 2
if dp[i] == 1:
    print("first")
elif dp[i] == 0:
    if a[i] % 2 == 0:
        flag = 0
        for i in range(N):
            if a[i] % 2 == 1:
                flag = 1
        if flag == 1:
            print("first")
        else:
            print("second")
    else:
        print("first")

Solution (Python):
n = int(input())
b = 0
for i in range(n):
    a = int(input())
    if a % 2 == 1:
        b += 1
        break

if b == 0:
    print('second')
else:
    print('first')

Solution (Python):
N = int(input())
A = [int(input()) for i in range(N)]
ans = []
for i in range(N):
  tmp = A[i] % 2
  ans.append(tmp)
if sum(ans) == 0:
  print("second")
  exit()
print("first")

Solution (Python):
n = int(input())
A_list = [int(input()) for _ in range(n)]
for a in A_list:
    if a % 2 == 1:
        print('first')
        exit()
print('second')

Solution (Python):
n,p=int(input()),1
for i in range(n):
    if int(input())%2: p=0
print(['first','second'][p])

Solution (Python):
N = int(input().strip())
a = []
for i in range(0, N):
    ak = int(input().strip())
    a.append(ak)

ME = 'first'
RUN = 'second'

me_win = True
all_even = True
for ai in a:
    all_even &= ai%2 == 0
me_win = not all_even

print(ME if me_win else RUN)

Solution (Python):
import fractions
from functools import reduce

N = int(input())
a = [int(input()) for x in range(N)]

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

res = gcd(*a)
if res % 2 == 0:
    print("second")
else:
    print("first")

Solution (Python):
N = int(input())

flag = False
for _ in range(N):
    a = int(input())
    if a % 2 == 1:
        flag = True
        break

print('first' if flag else 'second')

Solution (Python):
n=int(input())
p=1
for i in range(n):
    a=int(input())
    if a%2:
        p=0
print(['first','second'][p])

Solution (Python):
n=int(input())
a =list(int(input()) for i in range(n))
if all (a[i]%2==0 for i in range(len(a))):
      print("second")
else:
      print("first")

Solution (Python):
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    for i in range(N):
        input_raw = read_func().strip().split()
        [a] = [int(input_raw[0])]
        if a % 2 != 0:
            print "first"
            exit()
    print "second"


if __name__ == '__main__':
    main()

Solution (Python):


N = int(input())
aN = [int(input()) for i in range(N)]

if all([a % 2 == 0 for a in aN]):
    print('second')
else:
    print('first')

Solution (Python):
N = int(input().strip())

a = 0
for _ in range(N):
  _a = int(input().strip())
  a += _a%2
  
if a == 0:
  print('second')
else:
  print('first')

Solution (Python):

N = int(input())
a = [int(input()) for i in range(N)]

ans = 2
for ai in a:
    if ai % 2:
        ans = 1
        break

if ans == 2: print('second')
else: print('first')

Solution (Python):
N = int(input())
if len([x for x in [int(input()) for i in range(N)] if x % 2]):
  print("first")
else:
  print("second")

Solution (Python):
n = int(input())
for i in range(n):
    a = int(input())
    if a % 2 == 1:
        print("first")
        exit()
print("second")

Solution (Python):
n = int(input())
flag_first = False
for i in range(n):
    a = int(input())
    if a % 2 == 1:
        flag_first = True
if flag_first:
    print("first")
else:
    print("second")

Solution (Python):
def caddi2018b_d():
    n = int(input())
    a = [int(input()) for _ in range(n)]
    for val in a:
        if val % 2 == 1:
            print("first")
            return 0
    print("second")
    
    
    
    


caddi2018b_d()

Solution (Python):
n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
for i in a:
    if i%2==1:
        print('first')
        quit()
print('second')

Solution (Python):

N = int(input())
an = [int(input()) for _ in range(N)]

tmp = 0
for a in an:
    tmp += a%2

if tmp > 0:
    print("first")
else:
    print("second")

Solution (Python):
import numpy as np
N = int(input())
colors=[]
for i in range(N):
    colors.append(int(input()))
colors = np.array(colors)
if np.all(colors%2==0):
    print("second")
else:
    print("first")

Solution (Python):
N = int(input())
all1 = True
goukei = 0
existodd = False
for i in range(N):
    tmp = int(input())
    if tmp != 1:
        all1 = False
    if tmp % 2 == 1:
        existodd = True
    goukei += tmp
    
    
if(goukei%2==1 or all1 or existodd):
    print("first")
else:
    print("second")

Solution (Python):
N = int(input())
a = [0]*N
r=[0,0]
for i in range(N):
    r[int(input())%2]+=1
if r[1]>0:
    print("first")
else:
    print("second")

Solution (Python):
n=int(input())
a=[0 for i in range(n)]
b=0
for i in range(n):
    a[i] = int(input())
    if a[i]%2==1:
        b += 1
if b == 0:
    print("second")
else :
    print("first")

Solution (Python):
n = int(input())
a = [int(input())%2 for _ in range(n)]
if sum(a):
    print("first")
else:
    print("second")

Solution (Python):
N=int(input())

c=0
for i in range(N):
    z=int(input())
    if z%2==1:
        c+=1

if c>0:
    print('first')
else:
    print('second')

Solution (Python):
N = int(input())
a_lst = []
for i in range(N):
    a_lst.append(int(input()))

even_list = [ai % 2 for ai in a_lst]
if 1 in even_list:
    win = "first"
else:
    win = "second"
print(win)

Solution (Python):
import numpy as np

N = int(input())
a = np.array([ int(input()) for _ in range(N) ],dtype=np.int)

if np.any(a % 2):
    print("first")
else:
    print("second")

Solution (Python):
n = int(input())
a = []
b = 0
for i in range(n):
  if int(input()) % 2 == 1:
    b = 1
    break
if b == 0:
  print("second")
else:
  print("first")

Solution (Python):
N = int(input())
a = [0]*N
for i in range(N):
    a[i] = int(input())

def isAllOdd (a):
    for i in a:
        if i % 2 == 0:
            return False
    return True

def isAllEven (a):
    for i in a:
        if i % 2 == 1:
            return False
    return True

ans = 'first'
if N == 1:
    if a[0] % 2 == 1:
        ans = 'first'
    else:
        ans = 'second'
elif a.count(1) in [N-1, N]:
    ans = 'first'
else:
    if isAllOdd(a) or isAllEven(a):
        ans = 'second' 
    
print(ans)

Solution (Python):

import sys
import math
import numpy as np
import itertools



n = int(input())

a = [int(input()) for i in range(n)] 

ki=0

for i in a:
    if i % 2 == 1:
        ki += 1

if ki >= 1:
    print("first")
else:
    print("second")

Solution (Python):
n=int(input())
a=[int(input()) for i in range(n)]
a.sort()
l=[]
c=0
for j in range(n):
  if j==0:
    l.append(a[0]%2)
    if a[0]%2==1:
      c+=1
  else:
    l.append((a[j]-a[j-1])%2)
    if (a[j]-a[j-1])%2==1:
      c+=1
l.reverse()
if c==0:
  print("second")
elif c==1:
  print("first")
elif c==2:
    print("first")
elif c==3:
  if l[0]==1 and l[1]==1 and l[2]==1:
    print("second")
  else:
    print("first")
else:
  print("first")

Solution (Python):
N = int(input())

ans = 'second'
for _ in range(N):
    tmp = int(input())
    if tmp % 2 == 1:
        print('first')
        exit()
print(ans)

Solution (Python):




n = int(input())

awin_flg = False
for idx in range(n):
    wa = int(input())
    if (wa % 2) == 1:
        awin_flg = True


if awin_flg:
    print("first")
else:
    print("second")

Solution (Python):
n=int(input())
winner=2
for i in range(n):
  if int(input())%2==1:
    winner=1
    break
if(winner==2):
  print("second")
else:
  print("first")

Solution (Python):
winner='second'
N=int(input())
if N%2==0:
    winer='first'
for n in range(N):
    if int(input())%2==1:
        winner='first'
print(winner)