N=int(input())

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

S = sum(a)

S1 = 0

for i in range(N):

    if i%2 == 1:

        S1 += a[i]

b = [0 for i in range(N)]

b[0] = S - 2*S1

print(b[0],end=' ')

for j in range(1,N):

    b[j] = 2*a[j-1] - b[j-1]

    print(b[j],end=' ')

N = int(input())

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



All = sum(A)



lim = len(A)//2

Exc1 = sum([A[2*i+1] for i in range(lim)])



one = All - Exc1*2

ans = [one]

for i in range(1,N):

    print('{}'.format(ans[-1]),end=' ')

    ans.append(A[i-1]*2 - ans[-1])

print('{}'.format(ans[-1]))

N = int(input())
a = list(map(int, input().split()))
S = sum(a)
S1 = 0
for i in range(N):
    if i % 2 == 1:
        S1 += a[i]
b = [0 for i in range(N)]
b[0] = S - 2 * S1
print(b[0], end=" ")
for j in range(1, N):
    b[j] = 2 * a[j - 1] - b[j - 1]
    print(b[j], end=" ")

N = int(input())
A = list(map(int, input().split()))
All = sum(A)
lim = len(A) // 2
Exc1 = sum([A[2 * i + 1] for i in range(lim)])
one = All - Exc1 * 2
ans = [one]
for i in range(1, N):
    print("{}".format(ans[-1]), end=" ")
    ans.append(A[i - 1] * 2 - ans[-1])
print("{}".format(ans[-1]))

-a = list(map(int, input().split())) -S = sum(a) -S1 = 0 -for i in range(N): -    if i % 2 == 1: -        S1 += a[i] -b = [0 for i in range(N)] -b[0] = S - 2 * S1 -print(b[0], end=" ") -for j in range(1, N): -    b[j] = 2 * a[j - 1] - b[j - 1] -    print(b[j], end=" ") +A = list(map(int, input().split())) +All = sum(A) +lim = len(A) // 2 +Exc1 = sum([A[2 * i + 1] for i in range(lim)]) +one = All - Exc1 * 2 +ans = [one] +for i in range(1, N): +    print("{}".format(ans[-1]), end=" ") +    ans.append(A[i - 1] * 2 - ans[-1]) +print("{}".format(ans[-1]))