import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val n  = sc.nextInt
  val av = Vector.fill(n)(sc.nextInt)

  val resl = {
    val (oddsT, evensT) = av.zipWithIndex.partition(_._2 % 2 == 0)

    val odds = oddsT.map(_._1)
    val evens = evensT.map(_._1)

    if(n % 2 == 0) evens.reverse ++ odds
    else odds.reverse ++ evens
  }

  resl.zipWithIndex.foreach{case (a,i) =>
      if(i  == resl.length - 1) print(s"$a")
      else print(s"$a ")
  }
}