import Control.Monad
import Control.Monad.Primitive (PrimState)
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Data.IORef

main :: IO ()
main = do
    n <- fst . fromJust . B.readInt <$> B.getLine
    as <- V.fromList . B.words <$> B.getLine
    mv <- MV.unsafeNew (n + 1) :: IO (MV.MVector (PrimState IO) B.ByteString)
    l <- newIORef (n `div` 2)
    r <- newIORef (n `div` 2 + 1)
    forM_ [0..(n - 1)] $ \i ->
        if i `mod` 2 == (n - 1) `mod` 2
            then do
                m <- readIORef l
                MV.unsafeWrite mv m (as V.! i)
                modifyIORef l pred
            else do
                m <- readIORef r
                MV.unsafeWrite mv m (as V.! i)
                modifyIORef r succ
    j <- readIORef l
    v <- V.unsafeFreeze $ MV.slice (j + 1) n mv
    B.putStrLn $ B.unwords $ V.toList v
