import Control.Monad
import qualified Data.Vector.Unboxed as V
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)

main :: IO ()
main = do
    n <- fst . fromJust . B.readInt <$> B.getLine
    as <- V.fromList . (\s -> 0 : s) . map (fst . fromJust . B.readInt) . B.words <$> B.getLine
    if even $ V.length as
        then do
            forM_ [n, (n - 2) .. 1] $ \i -> do
                putStr $ show $ as V.! i
                putChar ' '
            forM_ [2, 4 .. n] $ \i -> do
                putStr $ show $ as V.! i
                putChar ' '
        else do
            forM_ [n, (n - 2) .. 1] $ \i -> do
                putStr $ show $ as V.! i
                putChar ' '
            forM_ [1, 3 .. n] $ \i -> do
                putStr $ show $ as V.! i
                putChar ' '
