import Control.Monad

solve :: [Int] -> String
solve as = if play 0 as then "first" else "second" where
    play t apples 
        | sum apples > 0 = play (t+1) (updates apples)
        | otherwise      = odd t
    updates :: [Int] -> [Int]
    updates apples = pack $ if all even apples
                            then eatEvenOne apples
                            else map (\x -> if odd x then x-1 else x) apples
    eatEvenOne :: [Int] -> [Int]
    eatEvenOne = iter [] where
        iter ac [] = ac
        iter ac (a:as) 
            | a > 0 && even a = ac++(a-1):as
            | otherwise = iter (a:ac) as
    pack [] = []
    pack (x:xs)
        | x == 0 = pack xs
        | otherwise = x : pack xs

readLine:: IO [Int]
readLine = fmap (map read . words) getLine

readLines :: Int -> IO [[Int]]
readLines = flip replicateM readLine
    
main :: IO() 
main = do
    [n] <- readLine
    l <- readLines n
    let ans = solve (concat l)
    putStrLn ans
