n = int(eval(input()))

A = list(map(int,input().split()))

A += A

#print(A)

Aeven = []

for i in range(2*n):

    if i%2 == 0:

        Aeven.append(A[i])

    else:

        Aeven.append(-A[i])

Aodd = []

for i in range(2*n):

    if i%2 == 0:

        Aodd.append(-A[i])

    else:

        Aodd.append(A[i])

from itertools import accumulate

Aodd = [0]+list(accumulate(Aodd))

Aeven = [0]+list(accumulate(Aeven))

for i in range(n):

    if i%2 == 0:

        print((Aeven[i+n]-Aeven[i]))

    else:

        print((Aodd[i+n]-Aodd[i]))



n = int(eval(input()))

A = list(map(int,input().split()))

res = 0

for i in range(n):

    if(i%2==0):res+=A[i]

    else:res-=A[i]

print(res)

for i in range(1,n):

    res = 2*A[i-1]-res

    print(res)

n = int(eval(input()))
A = list(map(int, input().split()))
A += A
# print(A)
Aeven = []
for i in range(2 * n):
    if i % 2 == 0:
        Aeven.append(A[i])
    else:
        Aeven.append(-A[i])
Aodd = []
for i in range(2 * n):
    if i % 2 == 0:
        Aodd.append(-A[i])
    else:
        Aodd.append(A[i])
from itertools import accumulate

Aodd = [0] + list(accumulate(Aodd))
Aeven = [0] + list(accumulate(Aeven))
for i in range(n):
    if i % 2 == 0:
        print((Aeven[i + n] - Aeven[i]))
    else:
        print((Aodd[i + n] - Aodd[i]))

n = int(eval(input()))
A = list(map(int, input().split()))
res = 0
for i in range(n):
    if i % 2 == 0:
        res += A[i]
    else:
        res -= A[i]
print(res)
for i in range(1, n):
    res = 2 * A[i - 1] - res
    print(res)

-A += A -# print(A) -Aeven = [] -for i in range(2 * n): -    if i % 2 == 0: -        Aeven.append(A[i]) -    else: -        Aeven.append(-A[i]) -Aodd = [] -for i in range(2 * n): -    if i % 2 == 0: -        Aodd.append(-A[i]) -    else: -        Aodd.append(A[i]) -from itertools import accumulate - -Aodd = [0] + list(accumulate(Aodd)) -Aeven = [0] + list(accumulate(Aeven)) +res = 0 -        print((Aeven[i + n] - Aeven[i])) +        res += A[i] -        print((Aodd[i + n] - Aodd[i])) +        res -= A[i] +print(res) +for i in range(1, n): +    res = 2 * A[i - 1] - res +    print(res)