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



Sample input:
2
1
2


Sample output:
first

Submission status: Accepted

Solution code:
n=int(input())
A=[int(input()) for _ in range(n)]
H=[a for a in A if a%2==0]
if len(H)==n:
  print("second")
else:
  print("first")

Submission status: Accepted

Solution code:
#降参

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

if 1 in a:
    print("first")
else:
    print("second")

Submission status: Accepted

Solution code:
_, *a = open(0)
print(["second","first"][any(int(b)%2 for b in a)])

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    a = [int(rl()) for _ in range(N)]
    
    print('second' if all(ai % 2 == 0 for ai in a) else 'first')


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    A=[int(input())for _ in range(n)]
    print("second" if all(a%2==0 for a in A) else "first")

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
flag = True
for _ in range(N):
    flag &= (int(input()) % 2 == 0)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
a = [INT() for _ in range(N)]
print("second" if all(x%2==0 for x in a) else "first")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
 
flag=False
for _ in range(N):
    a=int(input())
    if a%2==1:
        flag=True
if flag:
    print('first')
else:
    print('second')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ai = [int(input()) for i in range(n)]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
A = [int(input()) for _ in range(N)]

for a in A:
    if a % 2:
        print('first')
        exit()

print('second')

Submission status: Accepted

Solution code:
def main():
  n=int(input())
  for _ in range(n):
    if int(input())%2==1:
      print("first")
      return
  print("second")
main()

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
n = int(input())
num = []
for i in range(n):
  num.append(int(input()))
ans = "second"  
for n in num:
  if n % 2 == 1:
    ans = "first"
    
print(ans)

Submission status: Accepted

Solution code:
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N, *A = map(int, open(0).read().split())
    ans = 'second'
    for a in A:
        if a % 2 == 1:
            ans = 'first'
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
#ラス２を相手に食べさせる
#残り1種類の奇数→偶数を自分が担当
#残り1種類、偶数で　相手に渡す
#奇数が一個でもあれば勝てる？（全部偶数にして相手に渡せる）
# 2 3
ok=False
for i in range(N):
    a=int(input())
    if a%2==1:
        ok=True
if ok:
    print("first")
else:
    print("second")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
import math  # noqa
import bisect  # noqa
import queue  # noqa


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    A = []
    for _ in range(N):
        a = int(input())
        A.append(a)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    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')




resolve()

Submission status: Accepted

Solution code:
import sys

n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
    
for i in a:
    if i % 2 == 0:
        continue
    else:
        print("first")
        sys.exit()
        
print("second")

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n = int(readline())
lst1 = []
for i in range(n):
    lst1.append(int(readline()))

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

Submission status: Accepted

Solution code:
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
ans = "second"
for n in range(N):
    if ir() % 2 == 1:
        ans = "first"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
_,*a=open(0);print('first' if any(int(x)%2 for x in a)else'second')

Submission status: Accepted

Solution code:
import collections
N = int(input())
a = [0] * N
for i in range(N):
    a[i] = int(input())
def solve():
    return any(x % 2 == 1 for x in a)
print('first' if solve() else 'second')

Submission status: Accepted

Solution code:
N,*L = map(int, open(0).read().split())
if all(c%2==0 for c in L):
  print('second')
else:
  print('first')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 一度に食べられるリンゴを一つの山だと考える
# 青　青　青
# 赤　赤
# 黄
# だとすると、
# 青赤黄
# 青赤
# 青
# の3つの山があると考えてよい
# この山を想定したときに、各山のXORが0であればsecond、そうでなければfirst

N=int(input())
A=[0] * N
for i in range(N):
  A[i] = int(input())
  
A = sorted(A)
minus = 0
m = []
for i in range(len(A)):
  if (A[i] - minus)%2 == 1:
    m += [N-i]
  minus = A[i] + minus

if len(m) == 0:
  print("second")
else:
  from functools import reduce
  r = reduce(lambda x,y:x^y,m)
  print(("first","second")[r == 0])

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import bisect

n = int(stdin.readline().strip())
flag = 0
for i in range(n):
    tmp = int(stdin.readline().strip())
    if tmp % 2:
        flag = 1
        break
if flag:
    stdout.writelines('first\n')
else:
    stdout.writelines('second\n')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n, *a = map(int, sys.stdin.read().split())
print('second' if all(x % 2 == 0 for x in a) else 'first')

Submission status: Accepted

Solution code:
#CADDi 2018_D
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')

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    print("first") if any([a%2 for a in A]) else print("second")
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    print("second") if all(( a%2==0 for a in A)) else print("first")
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def main():
    N = int(input())
    A = (int(input()) for _ in range(N))
    print("second") if all(( a%2==0 for a in A)) else print("first")
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np
 
def main():
    stdin = np.fromstring(open(0).read(), dtype=np.int64, sep=' ')
    A = stdin[1:]
    A = np.mod(A, 2)
    print("first") if np.count_nonzero(A) else print("second")
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np

def main():
    stdin = np.fromstring(open(0).read(), dtype=np.int32, sep=' ')
    N = stdin[0]
    A = stdin[1:]
    A = np.mod(A, 2)
    print("first") if np.count_nonzero(A) else print("second")
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
flag = True
for _ in range(n):
    ai = int(input())
    if ai % 2 == 0:
        continue
    else:
        flag = False
if flag:
    print("second")
else:
    print("first")

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
N=int(input())
a=[int(input())for i in range(N)]
for i in a:
    if i%2:
        print("first")
        break
else:
    print("second")

Submission status: Accepted

Solution code:
n = int(input())
al = []
for _ in range(n):
    a = int(input())
    al.append(a)

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
print('second' if all(int(readline()) % 2 == 0 for i in range(n)) else 'first')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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
    
#solve
def solve():
    n = II()
    a = IR(n)
    if sum(map(lambda x: x & 1, a)):
        print("first")
    else:
        print("second")
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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

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


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

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

Submission status: Accepted

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

# 状態としてありえるのは、E:全て偶数 or O:いずれか1つ以上が奇数
# 最終的にEを押し付けられたら負けと考える（すべて0）
# 現状態がOであるなら、奇数のものだけを食べて、状態Eを相手に返すことができる
# 現状態がEであるなら、1つ以上食べる必要があるので、Oが相手に返る
# ここから、初期状態がOならばfirst, Eならばsecondが答えとなる

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

for A in As:
    if A % 2:
        print('first')
        break
else:
    print('second')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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():
  # 最後に食べたら勝ち
  # 1を引けば勝ち
  # 奇数調整をする
  # 相手に全て偶数を与えるよう調整する
  # all偶数だと負け

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

# main()
print(main())

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
# D - Harlequin / 
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
for _ in range(N):
  if int(input()) % 2:
    print("first")
    exit(0)
print("second")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
N=int(input())
a = [int(input()) for i in range(N)]
#はじめに奇数があったらfirstの勝ち
print('first' if 1 in [x%2 for x in a] else 'second')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
ans = 'second'

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

print(ans)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

print('first' if any(x % 2 for x in a) else 'second')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
n=int(input())
lis=[int(input()) for i in range(n)]
for num in lis:
  if num % 2==1:
    print("first")
    exit()
print("second")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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'

# main()
print(main())

Submission status: Accepted

Solution code:
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
#https://atcoder.jp/contests/tenka1-2018-beginner/tasks/tenka1_2018_c
#C - Align
"""
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")

#HLHL

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()