import scala.io.StdIn
import scala.collection.mutable.ListBuffer

object Main extends App {
  val out = new java.io.PrintWriter(System.out)
  val n = StdIn.readInt
  val a = StdIn.readLine.split(" ").map(_.toInt)

  def fe(b:ListBuffer[Int], cnt:Int, num:Int):Unit = {
      if((cnt&1) == 0) num +=: b else b += num
  }
  def fo(b:ListBuffer[Int], cnt:Int, num:Int):Unit = {
      if((cnt&1)==0) b += num else num +=: b
  }

  val b = ListBuffer.empty[Int]
  val len = a.size
  if((len&1) == 0) a./:(1)((cnt,i) => {fe(b,cnt,i); cnt+1})
  else  a./:(1)((cnt,i) => {fo(b,cnt,i); cnt+1})

  out.println(b.mkString(" "))
  out.flush
}