deal :: [Int] -> ([Int], [Int])
deal [] xs ys = (ys, xs)
deal [x] xs ys = (x:xs, ys)
deal (x:y:zs) xs ys = deal zs (x:xs) (y:ys)
 
main = do
  _ <- getLine
  as <- map read . words <$> getLine
  let (hs, ts) = deal as [] []
  print (hs ++ reverse ts)