fun main(args: Array<String>) {
    val pw = java.io.PrintWriter(System.out)
    Problem.solve(java.util.Scanner(System.`in`), pw)
    pw.flush()
}

object Problem {
    fun solve(sc: java.util.Scanner, pw: java.io.PrintWriter) {
        val N = sc.next().toInt()
        val A = Array(N) { sc.next().toLong() }
        val X = Array(N) { 0L }
        for (i in 1 until N) {
            X[(i * 2) % N] = X[(i * 2 - 2) % N] + A[(i * 2 - 1) % N] - A[(i * 2 - 2) % N]
        }
        val d = (A.sum() - X.sum() * 2) / N
        pw.println(X.map { it * 2 + d }.joinToString(" "))
    }
}
