object Main {
  def main(args: Array[String]): Unit = {
    val scanner = new java.util.Scanner(System.in)
    val n = scanner.nextInt()
    val reversed =
      Iterator.from(0, 1)
        .takeWhile(_ < n)
        .map(_ => scanner.nextInt())
        .foldLeft(List.empty[Int]) { case (acc, num) => num :: acc }
        .mkString(" ")
    println(reversed)
  }
}