import java.util.*
fun main(args: Array<String>){
	val cin = Scanner(System.`in`)
    val n = cin.nextInt()
    val a = Array<Long>(n, { cin.nextLong() })

    var sum: Long = 0
    var even_sum: Long = 0

    for (i in 0..n-1) {
        sum += a[i]
        if (i % 2 == 0) {
            even_sum += a[i]
        }
    }
    sum /= 2

    val ans = Array<Long>(n, { 0 })

    var head = 0
    var tail = n - 3
    var now_sum: Long = even_sum - a[n-1]
    var point = n - 1
    
    for (i in 0..n-1) {
        ans[point] = (sum - now_sum)*2
        now_sum -= a[head]
        head = (head + 2)%n
        tail = (tail + 2)%n
        now_sum += a[tail]
        point = (point + 2)%n
    }

    for (i in 0..n-1) {
        print(ans[i])
        print(" ")
    }
    println()
}