import qualified Data.Sequence as SQ
import Data.Foldable (toList)
adder::[(Int,Int)]->SQ.Seq Int->SQ.Seq Int
adder []          s = s
adder ((i,x):xs)  s = if mod i 2 == 0 then adder xs ((SQ.<|) x s) else adder xs ((SQ.|>)s x)

solver::[Int]->[Int]
solver xs = let d = adder (zip [1..] xs) (SQ.empty) in
            let n = length xs in
            if mod n 2 == 0 then toList d else toList (SQ.reverse d)

main::IO()
main =do
  n<-getLine
  dat<-getLine
  let d=map read (words dat)
  listPrint (solver d)

listPrint::[Int]->IO()
listPrint [] = putStr "\n"
listPrint (x:xs) = do
  putStr ((show x)++" ")
  listPrint xs
