import Data.List
import Data.Traversable

main :: IO()
main = do
  n <- read <$> getLine
  ps <- for [1..n] $ \x ->
    read <$> getLine
  putStrLn (if solve ps then "first" else "second")

toRevByte :: Integer -> [Integer]
toRevByte x = snd $ trb x 1
  where
    trb x n
      | x < n = (x, [])
      | otherwise = let (xx, ns) = trb x (n*2)
                    in if xx < n then
                      (xx, 0:ns)
                    else
                      (xx - n, 1:ns)

--solve :: [Integer] -> Bool
solve n = not $ and $ map (\x -> x `mod` 2 == 0) (calc n)

--calc :: [Integer] -> Integer
calc xs =
  let sorted = reverse $ sort xs
  in calc' 1 sorted

calc' n (x1:[]) = map (*x1) (toRevByte n)
calc' n (x1:x2:xs) =
  let ret = calc' (n+1) (x2:xs)
  in map (\(a,b) -> a+b) $ zip ((map (*(x1-x2)) (toRevByte n)) ++ [0..]) ret
