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 = 0
for k in range(n):
    if int(input())%2 == 1:
        a = 1

if a == 1:
    print('first')
else:
    print('second')

Submission status: Accepted

Solution code:
N = int(input())
A = [int(input()) for n 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 =  [0] * N
flg = True
for i in range(N):
    a[i] = int(input())
    if a[i] % 2 != 0:
        flg = False


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

Submission status: Accepted

Solution code:
N=int(input())
a = []
for i in [0]*N:
	a.append(int(input()))

'''
N=3
a=[100000,30000,20000]
'''

b=[x % 2 for x in a]

s = sum(b)
if s == 0:
	print("second")
else:
	print("first")

Submission status: Accepted

Solution code:
import copy

# 最後のリンゴを食べたものが勝者
"""
def func(_left, turn):
    left = []
    for i in _left:
        if i != 0:
            left.append(i)
    N = [i for i in range(len(left))]  # N = bit探索する桁数
    # Nの要素の全組み合わせが出力
    winFlag = False
    for i in range(1, 1 << len(N)):
        output = []
        copyLeft = copy.deepcopy(left)
        minus = 0
        for j in range(len(N)):
            if ((i >> j) & 1) == 1:
                output.append(j)  # このjが今回探索するindexの1つ
                if copyLeft[j] > 0:
                    copyLeft[j] -= 1
                    minus += 1
        if minus == 0:
            continue
        # if sum(copyLeft) == 0:
            # print("winner:{}({}) select:{}".format(turn, (turn+1) % 2, output))
        if func(copyLeft, turn + 1):
            winFlag = True
    return not winFlag

def answer(a, turn):
    if not func(a, turn):
        return "{}:1st".format(a)
    else:
        return "{}:2nd".format(a)
print(answer([1], 0))
print(answer([2], 0))
print(answer([3], 0))
print(answer([4], 0))
print(answer([5], 0))
print(answer([6], 0))

print(answer([1, 1], 0))
print(answer([2, 1], 0))
print(answer([2, 2], 0))
print(answer([3, 1], 0))
print(answer([3, 2], 0))
print(answer([3, 3], 0))
print(answer([4, 2], 0))
print(answer([4, 4], 0))

print(answer([1, 1, 1], 0))
print(answer([2, 1, 1], 0))
print(answer([2, 2, 1], 0))
print(answer([2, 2, 2], 0))

print(answer([1, 1, 1], 0))
print(answer([2, 1, 1], 0))
print(answer([2, 2, 1], 0))
print(answer([2, 2, 2], 0))
print(answer([3, 1, 1], 0))
print(answer([3, 2, 1], 0))
print(answer([3, 2, 2], 0))
print(answer([3, 3, 1], 0))
print(answer([3, 3, 2], 0))
print(answer([3, 3, 3], 0))
print(answer([4, 4, 4], 0))
"""
"""
print()
print(answer([4, 1, 1, 1], 0))
print(answer([4, 2, 1, 1], 0))
print(answer([4, 2, 2, 1], 0))
print(answer([4, 2, 2, 2], 0))
print(answer([4, 1, 1, 1], 0))
print(answer([4, 1, 1, 1], 0))
print(answer([4, 1, 1, 1], 0))
print(answer([4, 1, 1, 1], 0))
"""
n = int(input())
a = [0 for _ in range(n)]
for i in range(n):
    a[i] = int(input())
for _a in a:
    if _a % 2 == 1:
        print("first")
        exit()
print("second")

Submission status: Accepted

Solution code:
n = int(input())
flag = False
for i in range(n):
	x = int(input())
	if (x & 1) == 1:
		flag = True
		break
print('first' if flag else 'second')

Submission status: Accepted

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

to = 1
for i in list:
    if i%2==1:
        to = 0
        break
if to==0:
    print('first')
else:
    print('second')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, = [int(x) for x in input().strip().split(" ")]

r = "second"
for i in range(N):
    j, = [int(x) for x in input().strip().split(" ")]
    if j % 2 != 0:
        r = "first"
print(r)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, os
try: from typing import Any, Union, List, Tuple, Dict
except ImportError: pass
sys.setrecursionlimit(10**6)
if os.environ.get("USER") == "shun":
    def debug(*args): print(*args, file=sys.stderr)
else:
    print("NO DEBUG", file=sys.stderr)
    def debug(*args): pass
def exit(): sys.exit(0)


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


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

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

N = int(input())
As = []
for n in range(N):
    As.append(int(input()))

first_win = False
for a in As:
    if a % 2 == 1:
        first_win = True
if first_win:
    print("first")
else:
    print("second")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

def main():
    buf = input()
    N = int(buf)
    a = []
    for i in range(N):
        buf = input()
        a.append(int(buf))
    for i in a:
        if i % 2 == 0:
            continue
        else:
            print("first")
            return
    print("second")

if __name__ == '__main__':
    main()

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 _ in range(n)]

odd = False

for i in range(n):
	if a[i] % 2 == 1:
		odd = True

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter

n = int(input())
aaa = [int(line) for line in sys.stdin.readlines()]
cnt = Counter(aaa)
nim = 0
mnt = 0
prev_i = 0
for i, c in sorted(cnt.items()):
    di = i - prev_i
    mnt += c
    if di % 2 == 1:
        nim ^= mnt
print('first' if nim > 0 else 'second')

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
a = [ni() for _ in range(n)]

isodd = False
for ai in a:
    if ai%2:
        isodd = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = "second"

for i in range(N):
    a = int(input())
    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 i in range(N):
  if a[i]%2 ==1 :
    ans = "first"

print(ans)

Submission status: Accepted

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

k = 0 #0naraScond

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

A.sort()

xor_val =  0

last = 0
for i,a in enumerate(A):
    if i< N -1 and A[i]==A[i+1]:
        continue
    num = a-last
    if num%2:
        xor_val = xor_val ^ num

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = []
flg = False
for i in range(N):
  wk = int(input())
  A.append(wk)
  if wk % 2 > 0:
    flg = True
    
if flg:
  print("first")
else:
  print("second")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import collections
import itertools
import math
import re
from collections import Counter
from collections import deque
from collections import defaultdict
import bisect

# N, P = [int(x) for x in input().split()]

N = int(input())
A = []

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

isAllEven = True

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

if isAllEven == True:
    print("second")
else:
    print("first")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# D
res = "second"
N = int(input())
for _ in range(N):
    a = int(input())
    if a % 2 == 1:
        res = "first"
        
print(res)

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())
a=[int(input()) for i in range(n)]
a=[i%2 for i in a]
if sum(a):print('first')
else: print('second')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N=int(input())
A=[int(input()) for i in range(N)]
A.sort()
A=[0]+A

XOR=0
for i in range(1,N+1):
    if (A[i]-A[i-1])%2==0:
        continue
    else:
        XOR=XOR^(N-(i-1))

    #print(XOR)

if XOR!=0:
    print("first")
else:
    print("second")

Submission status: Accepted

Solution code:
def firstwin(a):
    odd = 0
    for x in a:
        if (x & 1) == 1:
            return True
    return False

def main():
    n = int(raw_input().strip())
    a = [int(raw_input().strip()) for i in xrange(n)]
    if firstwin(a):
        print 'first'
    else:
        print 'second'

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for a in A:
    if a%2:
        print('first')
        exit()
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:
def main():
    n = int(raw_input())
    a = [int(raw_input(), 10) for _ in xrange(n)]
    f = 0
    for x in a:
        f |= x
    print "first" if f % 2 else "second"
main()

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
n = int(input())
ls = [int(input()) for _ in range(n)]
ls = list(set(ls))
ls.sort()
num = ls[-1] - ls[-2]
if num % 2 == 0:
    print("second")
else:
    print("first")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for _ in range(n)]
a.sort()
num = a[-1]-a[-2]
if num%2 == 0:
    print('second')
else:
    print('first')

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
using ull = unsigned long long;
using ll = long long;
using namespace std;

int main(void) {
    
    int n;
    cin >> n;
    vector<int> a(n);
    bool even = true;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];

        if (a[i] % 2 != 0){
            even = false;
        }
    }

    if (even == true) {
        cout << "second" << endl;
    } else {
        cout << "first" << endl;
    }
    
    return 0;
}

Submission status: Runtime Error

Solution code:

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

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

    




                
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

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

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    a = list([(int(input())) % 2 for i in range(n)])
    su = sum(a)
    xors = 0
    for i in(a):
        xors ^= i
    if(xors != 0 || sum == n):
        print('first')
    else:
        print('second')

main()

Submission status: Runtime Error

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

main()

Submission status: Runtime Error

Solution code:
N = int(input())
A = []
X = 0
for i in range (0, N):
	A.append(int(input()))

A = [0]+sorted(A)

D = []

for i in range (1, N+1):
	if A[i]-A[i-i] !=0:
		D = D+[N+1-i]*(A[i]-A[i-1])
	else:
		continue

for i in range (0, len(D)):
	X = X^D[i]

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

Submission status: Runtime Error

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

if (a[-1] - a[-2]) % 2 == 0:
    print("second")
else:
    print("first")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

f="first"
s="second"
# print(a)
if sum(a)==n sum(a)==n+1:
    print(f)
    exit()
# print(sum(a)%2)
if sum(a)%2:
    print(f)
else:
    print(s)

Submission status: Runtime Error

Solution code:
n = int(input())
a = []
for i in range(n):
  a.append(int(input()%2))
k = sum(a)

if(k%2)or n==2:
  print("first")
else:
  print("second")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
input=sys.stdin.readline()
n=int(input())
for i in range(n):
  if int(input())%2==1:
    print('first')
    quit()
print('second')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
x=0
for i in range(n):
    a=int(input())
    cnt+=(a-1)%2
    cnt%=2
    x=max(a,x)
if x==1:
    print("first")
    if n%2==0:
        if cnt==0:
            print("second")
        else:
            print("first")
    else:
        if cnt==0:
            print("second")
        else:
            print("first")

Submission status: Runtime Error

Solution code:
n=int(input())
x=0
cnt=0
for i in range(n):
    a=int(input())
    x=max(a,x)
    cnt+=a
if x==1:
    print(first)
else:
    if (a-2)%2==1:
        print("first")
    else:
        print("second")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
A = list(map(int, input().split()))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
import sys
buf = sys.stdin.buffer

def main():
    N = int(buf.readline())
    A = np.frombuffer(buf.read(), dtype="int64")
    A = np.mod(A, 2)
    print("first") if np.count_nonzero(A) else print("second")
if __name__ == "__main__":
    main()

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
using vl = vector<ll>;
using vvl = vector<vl>;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

int main() {
    int N;
    cin >> N;
    ll ans = 0;
    REP(i, N) {
        ll tmp;
        cin >> tmp;
        ans += tmp;
    }
    if(ans % 2 == 1) {
        cout << "first" << endl;
    } else {
        cout << "second" << endl;
    }
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
using vl = vector<ll>;
using vvl = vector<vl>;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

int main() {
    int N;
    ll ans = 0;
    REP(i, N) {
        ll tmp;
        cin >> tmp;
        ans += tmp;
    }
    if(ans % 2 == 1) {
        cout << "first" << endl;
    } else {
        cout << "second" << endl;
    }
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
a=[int(input()) for i in range(N)]
a.sort()
ans=["second","first"]
print(ans[(a[-1]-a[-2])%2])

Submission status: Runtime Error

Solution code:
N=int(input())
L=list(map(int,input().split()))
if al(l%2==0 for l in L):
  print("second")
else:
  print("first")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
#%%
n = int(input())
a = [0] * n
for i in range(n):
    a[i] = int(input())
ans = sum(a)

if a % 2 == 0:
    print('second')
else:
    print('first')

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

Solution code:

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N  = int(input)
nums = [i for int(input()) in range(N)]
nums = list(set(nums))
s = sum(nums)
if s % 2 == 0:
  print("second")
else:
  print("first")

Submission status: Runtime Error

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

if max(a)%2 == 0:
    print("second")
else:
    print("first")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
ar = []
for i in range(a):
    l = int(input())
    ar.append(l)
ar = sorted(ar,reverse=True)
if ar[0] - ar[1] == 0:
    print("second")
elif (ar[0]-ar[1]) % 2 == 0:
    print("second")
else:
    print("first")

Submission status: Runtime Error

Solution code:
a = int(input())
ar = []
for i in range(a):
    l = int(input())
    ar.append(l)
ar = sorted(ar,reverse=True)
if (ar[0]-ar[1]) % 2 == 0:
    print("second")
else:
    print("first")

Submission status: Runtime Error

Solution code:
a = int(input())
ar = []
for i in range(a):
    l = int(input())
    ar.append(l)
ar = sorted(ar,reverse=True)
if ar[0]-ar[1] % 2 == 0:
    print("second")
else:
    print("first")

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
input()
if [i for i in map(int, input().split()) if i % 2]:
  print('first')
 else:
  print('second')

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  print("second")
else:
  print("first")
  a[100000000000000000000]

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert xor <= 10000
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert 10000<=xor
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert 8000<=xor and xor <= 10000 
  print("second")
else:
  print("first")
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert 10000<=xor
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert 8000<=xor and xor <= 10000 
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert 5000<=xor and xor <= 8000 
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
import collections
N = int(input())
a = []
s = 0
for i in range(N):
    a.append(int(input()))
    s += a[i]

if N >= 2:
    if s == N or s == len(collections.Counter(a)):
        if s % 2 ==0:
            re = 'second'
        else:
            re = 'first'
    else:
        a.sort()
        diff = a[-1] - a[-2]
        if diff > 0:
            if diff % 2 == 0:
                re = 'second'
            else:
                re = 'first'
else:
    if a[0] % 2==0:
        re = 'second'
    else:
        re = 'first'
    
print(re)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert xor <= 1000
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert 2500<=xor and xor <= 5000 
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert 1000<=xor and xor <= 2500 
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert 100<xor and xor < 1000 
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  for i in a:
    if i == 1:
      print("first")
      exit()
  assert 11111< xor
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert n> 1000 and a[600]<80000 and a[600] > 60000
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert n == 10**5 and xor == 0 and a[0] > 90000
  print("second")
else:
  print("first")

Submission status: Runtime Error

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

a.sort()
diff = a[-1] - a[-2]
if diff % 2 == 0:
    re = 'second'
else:
    re = 'first'
    
print(re)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert n == 10**5 and xor == 0 and a[0] > 50000
  print("second")
else:
  print("first")

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(input()) for i in range(n)]
for i in a:
  if i == 1:
    print("first")
    exit()
xor = a[0]
for i in range(1,n):
  xor ^= a[i]
if xor %2 == 0:
  assert n == 10**5 and xor == 0
  print("second")
else:
  print("first")