n = gets.chomp.to_i
apple_ary = Array.new(n)
n.times do |i|
    apple_ary[i] = gets.chomp.to_i
end

def puts_ans(n)
    if n % 2 == 0
        puts 'second'
    else
        puts 'first'
    end
end

if n == 1
    puts_ans(apple_ary[0])
    exit
end

apple_ary.sort!
puts_ans(apple_ary.last - apple_ary[n-2])
