{-# OPTIONS_GHC -O #-}

import Control.Monad
import Data.List
import qualified Data.ByteString.Lazy.Char8 as B
import qualified Data.Sequence as Sq
import Data.Sequence ((<|),(|>), empty)

readIntLL = map(unfoldr(B.readInt.B.dropWhile(==' '))).B.lines<$>B.getContents

pushl s [] = s
pushl s (a:as) = a <| (pushr s as)

pushr s [] = s
pushr s (a:as) = (pushl s as) |> a

main=do
    [n]:as:_ <- readIntLL
    --
    let rs = pushl empty $ reverse as
    forM_ rs $ \i -> do putStr $ show i ++ " "
    putStrLn ""
