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 (odds, evens) = av.zipWithIndex.partition(_._2 % 2 == 0)

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

  val res = resl.map(_._1).mkString(" ")
  println(res)
}

