solve :: [Int] -> [Int] -> [Int] -> Int -> [Int]
solve [] ls rs i
  | even i = ls ++ reverse rs
  | otherwise = rs ++ reverse ls
solve (x:xs) ls rs i
  | odd i = solve xs (x:ls) rs (i+1)
  | otherwise = solve xs ls (x:rs) (i+1)

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