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:
def main():
  n=int(input())
  for _ in range(n):
    a=int(input())
    if a&1:
      return "first"
  return "second"

ans=main()
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
for i in range(n):
    p = int(input())
    if p % 2 == 0:
        continue
    else:
        print("first")
        exit()

print("second")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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
# MOD = 998244353


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

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

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    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()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
N = int(input())
a = [int(input()) for _ 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())
b=False
for i in range(n):
  num=int(input())
  if num%2==1:
    b=True
if b:
  print("first")
else:
  print("second")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print("second")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

isAllEven = True

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

if isAllEven:
    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%2==0 for a in A]) else "first")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#D問題
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#CADDi D

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
a = [I() for _ in range(n)]
flg = 0
for i in a:
    if i % 2:
        flg = 1
if flg == 0:
    print('second')
else:
    print('first')

Submission status: Accepted

Solution code:
n = int(input())

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

for i in range(n):
    if a[i] %2 == 0:
        continue
    else:
        print("first")
        exit()

print("second")

Submission status: Accepted

Solution code:
import sys

def main():
  input = sys.stdin.readline
  n = int(input())
  for i in range(n):
    a = int(input())
    if a % 2 == 1:
      print('first')
      exit()
  print('second')
  
if __name__ == '__main__':
    main()

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):
    tmp=int(input())
    if tmp%2==1:
        print("first")
        import sys
        sys.exit()
print("second")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    n = int(input())
    a = [int(input()) for _ in range(n)]

    for ai in a:
        if ai % 2 == 1:
            print('first')
            exit()

    print('second')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def solve(n, a):
    for i in range(n):
        if a[i] % 2 == 1:
            return "first"
    return "second"

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
arr=[int(input()) for _ in range(n)]
cnt=0
flag=0
for i in range(n):
  if arr[i]==1:
    cnt+=1
  else:
    if arr[i]%2==1:
      flag=1
if cnt==0:
  if flag==0:
    print('second')
  else:
    print('first')
else:
  print('first')

Submission status: Accepted

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

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:
N = int(input())
a = [int(input())for _ in range(N)]
flag = False
for i in a:
    if(i%2==1):
        flag = True
        break
if(flag):
    print('first')
else:
    print('second')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 入力
N = int(input())
a = [int(input()) for _ in range(N)]

# aの要素がすべて奇数ならば、かつ、そのときに限りルンルンが勝つ
ans = (
    'first' if any(x % 2 == 1 for x in a) else
    'second'
)

# 出力
print(ans)

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:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
    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)]
 
ok = 1
for a in A:
    if a % 2 == 1:
        ok = 0
print(["first", "second"][ok])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

for _ in range(n):
    if int(input())%2 == 1:
        print("first")
        exit()
else:
    print("second")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    for a in A:
        if a % 2 > 0:
            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))  # type: int
    a = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, a)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
N=int(input())
flag=True
for i in range(N):
    if int(input())%2==1:
        flag=False
        break
if flag:print('second')
else:
    print('first')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = [int(input())%2 for _ in range(n)]
if any(l):
  print("first")
else:
  print("second")

Submission status: Accepted

Solution code:
N=int(input())
flg=True
for i in range(N):
    A=int(input())
    if A%2==1:
        flg=False

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

Submission status: Accepted

Solution code:
import operator
from functools import reduce

N = int(input())
a = []
for i in range(N):
	a.append(int(input()))
a = sorted(a)

aa = []
aa.append(a[0])
for i in range(N - 1):
	aa.append(a[i + 1] - a[i])

b = []

for i in range(N):
	if aa[-1 - i] % 2 == 0:
		b.append(0)
	else:
		b.append(1 + i)

if N == 1:
	if b[0] != 0:
		print("first")
	else:
		print("second")
else:
	ans = reduce(operator.xor, b)
	if ans != 0:
		print("first")
	else:
		print("second")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''input
3
1
30000
20000
'''
import time
import math

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

Submission status: Accepted

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

ans = "first"
for a in aList:
    if a % 2 == 1:
        break
else:
    ans = "second"

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = []
i = 0
while i < n:
    a.append(int(input()))
    i += 1

#print(a)
#すべての要素が偶数なら負け
#＝一つでも奇数の要素があれば勝ち
result = 'second'
for j in a:
    if j % 2 != 0:
        result = 'first'
        break
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input().strip())
data = [int(input().strip()) for _ in range(n)]

print ("first" if any(x % 2 == 1 for x in data) else "second")

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:
print('first') if [int(input())%2 for i in range(int(input()))].count(1)!=0 else print('second')

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
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 LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n = I()
    a = [I() for _ in range(n)]
    for c in a:
        if c % 2 == 1:
            return 'first'
    return 'second'


print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = []
s = 0
for i in range(N):
    a.append(int(input()))
    if a[i] % 2 == 0:
        s += 1
        
if s == N:
    re = 'second'
else:
    re = 'first'
    
print(re)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(n):
    ans|=int(input())
if ans&1:
    print('first')
else:
    print('second')

Submission status: Accepted

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

ok = 1
for a in A:
    if a % 2 == 1:
        ok = 0
print(["first", "second"][ok])

Submission status: Accepted

Solution code:
import sys
print('second' if all(i%2==0 for i in list(map(int,sys.stdin))[1:]) else 'first')

Submission status: Accepted

Solution code:
print("second" if all(int(input())%2 == 0 for i in range(int(input()))) 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:
INF = 999999999999999999L
EPS = 1e-12

def read():
    return raw_input().strip()

def read_ints():
    return map(int,read().split())

n = int(read())
cnt = 0
for i in range(n):
    a = int(read())
    if a%2 == 1:
        cnt += 1
        
if cnt == 0:
    print "second"
else:
    print "first"

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

N = input()

flag = False
for i in range(N):
    if input() % 2 == 1:
        flag = True

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(input()) for i in range(N)]
odd = 0
for i in range(len(A)) :
    a = A[i]
    if a % 2 != 0 :
        odd += 1
        break
if odd == 1 :
    print("first")
else :
    print("second")

Submission status: Accepted

Solution code:
n=int(input())
if [i for i in [int(input()) for _ in range(n)] if i % 2]:
    print('first')
else:
    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)]
for a in A:
    if a%2 == 1:
        print("first")
        break
else:
    print("second")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=[int(input()) for i in range(n)]
b=list(set(a))
c=0
for i in range(n):
    if a[i]%2==1:
        c+=1
if len(b)==1 and b[0]==1:
    print("first")
elif sum(a)%2==0:
    if c%2==0 and c>=2:
        print("first")
    else:
        print("second")
else:
    print("first")

Submission status: Accepted

Solution code:
N = int(input())
a = [int(input()) for _ in range(N)]
win = False
for aa in a:
    if aa % 2 == 1:
        win = True
        break

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

Submission status: Accepted

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


def main():
    n = int(input())
    cnt = {0 : 0}
    for i in range(n):
        a = int(input())
        cnt[a] = cnt.get(a, 0) + 1

    keys = list(cnt.keys())
    keys.sort()

    ok = 0
    for i in range(len(keys)-1):
        k1, k2 = keys[i], keys[i+1]
        if (k2-k1) % 2:
            ok ^= n
        n -= cnt[k2]

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = []
for i in range(n):
    temp = int(input())
    a.append(temp)
now = -1 #second win
for i in range(n):
    if a[i]%2 != 0:
        now = -1*(-1)
if now == -1:
    print("second")
else:
    print("first")

Submission status: Accepted

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

d = ["second", "first"]

for a in a_list:
  if a % 2 != 0:
    print(d[1])
    break
else:
  print(d[0])

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
n=int(input())
color=[]
for i in range(0,n):
    color.append(int(input()))
tag=True
for k in color:
    if k%2!=0:
        tag=False
        break
if tag==True:
    print("second")
else:
    print("first")