import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import Data.ByteString.Char8 as B
import Data.Char
import Control.Monad

put :: VUM.IOVector Int -> Int -> IO ()
put vec i = VUM.read vec i >>= \r -> Prelude.putStr $ show r ++ " "

solve vec n 
    | even n = do
        VU.forM_ (VU.reverse $ VU.fromList [1,3..n-1]) $ put vec
        VU.forM_ (VU.fromList [0,2..n-2]) $ put vec
        Prelude.putStrLn ""
    | otherwise = do
        VU.forM_ (VU.reverse $ VU.fromList [0,2..n-1]) $ put vec
        VU.forM_ (VU.fromList [1,3..n-2]) $ put vec
        Prelude.putStrLn ""

main = do
    n <- readLn :: IO Int
    xs <- VU.unfoldrN n (B.readInt . B.dropWhile isSpace) <$> B.getLine
    xs' <- VU.unsafeThaw xs
    solve xs' n