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):

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):

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):
import sys
input = sys.stdin.readline
from collections import defaultdict, Counter

N = int(input())
a = [int(input()) for i in range(N)]
ans = 'first' if any([x%2 for x in a]) else 'second'
print(ans)

Solution (Python):
N=int(input())
ans='second'
for i in range(0,N):
    a=int(input())
    if a%2==1:
        ans='first'

print(ans)

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

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

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

cnt = 0
for i in range(n):
    if a[i] % 2 == 0:
        cnt += 1

if cnt == n:
    print("second")
else:
    print("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):



def main():
  n = int(input())
  odd_count = sum([int(input()) % 2 for _ in range(n)])
  print('first' if odd_count > 0 else 'second')

if __name__=='__main__':
  main()

Solution (Python):
n = int(input())
ans = 'second'
for _ in range(n):
    a = int(input())
    if a%2 != 0:
        ans = 'first'
print(ans)

Solution (Python):
N = int(input())
ret = "second"
for _ in range(N):
    a = int(input())
    if a % 2 != 0:
        ret = "first"
print(ret)

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

cnt = 0
for a in As:
    if a % 2 == 0:
        cnt += 1
if cnt == N:
    print("second")
else:print("first")

Solution (Python):
import sys
INF = 10 ** 9
MOD = 10 ** 9 + 7
from collections import deque
sys.setrecursionlimit(100000000)

def main():
    n = int(input())
    flag = True
    for _ in range(n):
        a = int(input())
        if a%2 != 0:
            flag = False
            break
    
    if flag:
        print('second')
    else:
        print('first')
if __name__=='__main__':
    main()

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

Solution (Python):
def main():
    apples = int(input())
    count = 0
    for _ in range(apples):
        if int(input()) % 2 == 0:
            count += 1
    print("first" if count != apples else "second")


if __name__ == '__main__':
    main()

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

for A in As:
    if A % 2:
        print('first')
        break
else:
    print('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 = []
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):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  
  
  
  
  

  n=I()
  f=False
  for _ in range(n):
    if I()%2==1:
      f=True
  if f:
    return 'first'
  return 'second'


print(main())

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

if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
a=[]
even=True
for i in range(n):
    ai=int(input())
    a.append(ai)
    if(ai%2!=0):
        even=False
print('second' if even else 'first')

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

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

def main():
    N = int(input())
    b = False
    for _ in range(N):
        if int(input())%2 != 0:
            b = True
            break
            
    if b:
        print("first")
    else:
        print("second")

if __name__ == "__main__":
    main()

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

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

Solution (Python):

n=int(input())
a=[int(input()) for i in range(n)]
odd,even=0,0
for aa in a:
    if aa%2==1:
        odd+=1
    else:
        even+=1
if even==n:
    print('second')
else:
    print('first')

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

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

Solution (Python):
print("sfeicrosntd"[sum([int(input())%2 for i in range(int(input()))])>0::2])

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
for _ in range(N):
  if int(input()) % 2:
    print("first")
    exit(0)
print("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())
ans = True
for i in range(N):
    ai = int(input())
    if ai % 2 != 0:
        ans = False
        break
        
if ans:
    print("second")
else:
    print("first")

Solution (Python):
N = int(input())
ans_flag = False
for i in range(N):
  a = int(input())
  if not a%2==0:
    ans_flag = True
    break

if ans_flag:
  print("first")
else:
  print("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):
def main():
    N = int(input())
    A = [int(input()) for i in range(N)]
    flag = False
    for a in A:
        if a % 2:
            flag = True
    if flag:
        print("first")
    else:
        print("second")


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
A = [int(input()) for _ in range(N)]

odd = sum(a % 2 == 1 for a in A)

if odd == 0:
    ans = "second"
else:
    ans = "first"

print(ans)

Solution (Python):
import sys

read = sys.stdin.read

N, *a = map(int, read().split())
a = [i for i in a if i % 2 == 1]
if len(a) > 0:
    print('first')
else:
    print('second')

Solution (Python):
import sys

read = sys.stdin.read

N, *a = map(int, read().split())
a = [i % 2 for i in a]
if 1 in a:
    print('first')
else:
    print('second')

Solution (Python):
N,*A=map(int, open(0).read().split())
print("second" if all(a%2==0 for a in A) else "first")

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

Solution (Python):

import sys

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


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

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

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

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

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

Solution (Python):
import sys


N, *A = map(int, open(0).read().split())

for a in A:
  if a % 2:
    print("first")
    sys.exit()
  
print("second")

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    for a in A:
        if a & 1:
            print("first")
            return
    else:
        print("second")


if __name__ == '__main__':
    main()

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

print('first' if 1 in [x%2 for x in a] else 'second')

Solution (Python):
n=int(input())
lists=[0 for i in range(n)]
for i in range(n):
    a=int(input())
    lists[i]=a
flag=True
for i in range(n):
    if lists[i]%2!=0:
        flag=False
        break
if flag:
    print("second")
else:
    print("first")

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

for num in S:
    if num%2!=0:
        print("first")
        exit()
print("second")

Solution (Python):
from sys import stdin
n = int(stdin.readline().rstrip())
li = [int(stdin.readline().rstrip()) for _ in range(n)]
if all(i%2 == 0 for i in li):
    print("second")
else:
    print("first")

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

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())
ans = 'second'

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

print(ans)

Solution (Python):
def main() -> None:
    N = int(input())
    P = [int(input()) for _ in range(N)]
    print("first" if any(x % 2 == 1 for x in P) else "second")


if __name__ == '__main__':
    main()

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

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

Solution (Python):
N = int(input())
a = list(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):
n = int(input())
for i in range(n):
  x = int(input())
  if x%2:
    print("first")
    exit()
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 = [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())
lis=[int(input()) for i in range(n)]
for num in lis:
  if num % 2==1:
    print("first")
    exit()
print("second")

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

cond = 0
for i in range(N):
	if A[i] % 2 == 1:
		cond = 1
		break

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

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

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

Solution (Python):


N=int(input())

A=[]
for _ in range(N):
    A.append(int(input()))
    
B=list(map(lambda x : x%2,A))

if B.count(0)==len(B):
    print("second")
else:
    print("first")

Solution (Python):
import sys
N = int(input())
A = [int(sys.stdin.readline()) 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 _ in range(n)]
print('second' if all(a[i]%2==0 for i in range(n)) else 'first')

Solution (Python):
N = int(input())
a = list(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)]
o=False
for a in A:
  if(a%2==1):
    o=True
print("first" if o else "second")

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  l=[I() for _ in range(n)]

  for x in l:
    if x%2==1:
      return 'first'
  return 'second'


print(main())

Solution (Python):
from _collections import deque


def parser():
    while 1:
        data = list(input().split(' '))
        for number in data:
            if len(number) > 0:
                yield (number)


input_parser = parser()


def gw():
    global input_parser
    return next(input_parser)


def gi():
    data = gw()
    return int(data)


MOD = int(1e9 + 7)

import numpy
import scipy
from collections import deque
from math import sqrt
from math import floor


"""
need to consider the case that ticket is not enough to lower everything
"""

N = gi()

hasO = 0

for i in range(N):
    a = gi()
    if (a % 2):
        hasO = 1

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

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

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

print("first" if A else "second")

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

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

def main():
  n = int(input())
  for _ in range(n):
    a = int(input())
    if a%2:
      print("first")
      break
  else:
    print("second")
    
if __name__ == '__main__':
  main()

Solution (Python):
def main():
  n=int(input())
  for _ in range(n):
    a=int(input())
    if a&1:
      return "first"
  return "second"

ans=main()
print(ans)

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
flag = False
for i in range(N):
    if A[i] % 2 == 1:
        flag = True

if flag:
    print("first")
else:
    print("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())
f=0
for i in range(N):
    if int(input())%2!=0:
        f=1
if f==0:
    print("second")
else:
    print("first")

Solution (Python):
N=int(input())
A=[0]*N
for i in range(N):
    A[i]=int(input())
f=0
for i in range(N):
    if A[i]%2==1:
        f=1

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

Solution (Python):
import sys
n = int(input())
a_ls = []
for i in range(n):
    a = int(sys.stdin.readline().strip())
    a_ls.append(a)
if all([a % 2 == 0 for a in a_ls]):
    print("second")
else:
    print("first")

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

odd = len([ai for ai in a if ai%2==1])

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

Solution (Python):
def pff(m):
    pf = {}
    for i in range(2, int(m ** 0.5) + 1):
        while m % i == 0:
            pf[i] = pf.get(i, 0) + 1
            m //= i
    if m > 1: pf[m] = 1
    return pf
def examC():
    N, P = LI()
    d = pff(P)

    ans = 1
    for key,i in d.items():
        ans *= key**(i//N)
    print(ans)
    return

def examD():
    N = I()
    A = [I() for _ in range(N)]
    ans = "second"
    for i in A:
        if i%2==1:
            ans = "first"
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examD()

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

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

Solution (Python):
n = int(input())
for i in range(n):
    p = int(input())
    if p % 2 == 0:
        continue
    else:
        print("first")
        exit()

print("second")

Solution (Python):
def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    A = list(map(lambda x: x % 2, A))
    if sum(A) == 0:
        print('second')
    else:
        print('first')


main()

Solution (Python):
import os
import sys
from collections import Counter

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



N = int(sys.stdin.buffer.readline())
A = [int(sys.stdin.buffer.readline()) for _ in range(N)]

A = np.array(A, dtype=int)

if np.all(A % 2 == 0):
    print('second')
else:
    print('first')

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


def main():
    N = int(input())
    A = []
    for _ in range(N):
        A.append(int(input()))
    for a in A:
        if a % 2 == 1:
            print("first")
            return
    print("second")


if __name__ == '__main__':
    main()

Solution (Python):
import sys
stdin = sys.stdin
 
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  

N = ri()
A = [ri() for _ in range(N)]
even_cnt = sum([1 for x in A if x % 2 == 0])
odd_cnt = N - even_cnt
print('first' if odd_cnt else 'second')

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    a = IR(n)
    if all([not i&1 for i in a]):
        print("second")
    else:
        print("first")
    return


if __name__ == "__main__":
    solve()

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

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

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

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

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

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

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

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

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
a = inpln(n)
for i in a:
    if i%2:
        print('first')
        break
else:
    print('second')

Solution (Python):
from collections import Counter,defaultdict,deque
import sys,bisect,math,itertools,string,queue,copy
from heapq import heappop, heappush
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7

def inp(): 
    return int(input())
def inpm(): 
    return map(int,input().split())
def inpl(): 
    return list(map(int, input().split()))
def inpls(): 
    return list(input().split())
def inplm(n): 
    return list(int(input()) for _ in range(n))
def inpll(n): 
    return sorted([list(map(int, input().split())) for _ in range(n)])
def sortx(x,n,k):
    if k == 0:x.sort(key=lambda y:y[1,n])
    else:x.sort(reversed=True, key=lambda y:y[1,n])

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

if __name__ == "__main__":
    main()

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

Solution (Python):
n=int(input())
print("sfeicrosntd"[sum([int(input())%2 for _ in [0]*n])>0::2])

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

Solution (Python):
import sys
input=sys.stdin.readline
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())
f = True
for i in range(n):
	a = int(input())
	if a % 2 != 0:
		f = False
print('second' if f else 'first')

Solution (Python):

N = int(input())

A = []

for i in range(N):

    a = int(input())
    A.append(a)

A.sort()

ans = 0
las = 0

for i in range(N):

    if (A[i] - las) % 2 != 0:
        ans ^= N - i

    las = A[i]

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

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

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

Solution (Python):

n = int(input())
a = [0] * n
flag = True
for i in range(n):
    a[i] = int(input())
    if a[i] % 2 == 1:
        flag = False

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

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))



N = I()
a = Line(N,1)

ans = 'second'
for x in a:
    if x%2==1:
        ans = 'first'
        break

print(ans)

Solution (Python):
n=int(input())
lists=[]
for i in range(n):
    s=int(input())
    lists.append(s)
if all(lists[i]%2==0 for i in range(n)):
    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!=0:
        print("first")
        exit(0)
print("second")

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

def main():
    n = int(input().strip())
    a = [0] * n
    for i in range(n):
        a[i] = int(input().strip())
    if all(True if v % 2 == 0 else False for v in a):
        print('second')
    else:
        print('first')

if __name__ == '__main__':
    main()

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

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

for i in range(n):
    a = int(input())
    if a % 2 != 0:
        print("first")
        exit()

print("second")

Solution (Python):

def main():
    N, *A = map(int, open(0).read().split())
    for i in A:
        if i % 2:
            print("first")
            return
    print("second")


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N, *A = map(int, open(0).read().split())
    for i in A:
        if i & 1:
            print("first")
            return
    print("second")


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N, *A = map(int, open(0).read().split())
    flg = any(i & 1 for i in A)
    print("first" if flg else "second")


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N, *A = map(int, open(0).read().split())
    flg = any(i & 1 for i in A)
    print("first" if flg else "second")


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N, *A = map(int, open(0).read().split())
    flg = all(i % 2 == 0 for i in A)
    print("second" if flg else "first")


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N, *A = map(int, open(0).read().split())
    for i in A:
        if i % 2:
            print("first")
            return
    print("second")


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N, *A = map(int, open(0).read().split())
    flg = any(i % 2 for i in A)
    print("first" if flg else "second")


if __name__ == "__main__":
    main()

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

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

ans = 'second'
for a in A:
  if a % 2 == 1:
    ans = 'first'
    break
print(ans)

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

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

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

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

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

    for i in range(n):
        if a[i] % 2 == 1:
            print("first")
            exit()
    print("second")

if __name__ == '__main__':
    main()

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

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

isAllEven = True

for a in A:
    if a % 2 == 1:
        isAllEven = False
        break

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

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

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

Solution (Python):
import numpy as np
n = int(input())
flag = False
for i in range(n):
    a = int(input())
    if a %2 == 1:
        flag = True

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

Solution (Python):

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

Solution (Python):
N = int(input())
A = list(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())
flag = False
for _ in range(N):
    if int(input()) % 2 != 0:
        flag = True
print("first" if flag else "second")