main :: IO ()
main = do
  _ <- getLine
  a <- fmap read . words <$> getLine :: IO [Int]
  putStrLn . unwords . fmap show $ solve a

solve :: [Int] -> [Int]
solve [] = []
solve ls = fmap (ext f) mysplit ls where
  f = even $ length ls
  ext = \flag -> \(o,e) -> if flag then reverse o ++ e else reverse e ++ o

mysplit :: [a] -> ([a],[a])
mysplit ls = (ods,eves) where
  y = length ls
  ods = [ls !! x | x <- [0..(y - 1)], x `mod` 2 == 1]
  eves = [ls !! x | x <- [0..(y - 1)], x `mod` 2 == 0]
