import Prelude
import Data.Char
import Data.Sequence (Seq)
import qualified Data.Sequence as S
import Data.Foldable

solverpre :: [Int] -> Seq Int -> Seq Int
solverpre [] seq = seq
solverpre (x:xs) seq
    |even (length xs) = solverpre xs $ x S.<| seq
    |otherwise = solverpre xs $ seq S.|> x

solverpre2 :: [Int] -> Seq Int
solverpre2 as
    = solverpre as S.empty

solver as = toList $ solverpre2 as


printList :: [Int] -> IO ()
printList [] = return ()
printList [x] = print x
printList (x:xs) = do
  putChar $ intToDigit x
  putStr " "
  printList xs

main :: IO ()
main = do
    n <- readLn :: IO Int
    as <- map read . words <$> getLine
    printList $ solver as

