deal :: [Int] -> [Int] -> [Int] -> [Int]
deal [] xs ys = ys ++ reverse xs
deal [x] xs ys = x:xs ++ reverse ys
deal (x:y:zs) xs ys = deal zs (x:xs) (y:ys)
 
putList = putStr . unwords . map show
 
main = do
  _ <- getLine
  as <- map read . words <$> getLine
  putList $ deal as [] []