N = int(eval(input()))

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



ans = [0] * N

ans[0] = sum(A) - 2 * sum(A[1:N-1:2])

for i in range(N-1):

    ans[i+1] = 2 * A[i] - ans[i]

print((*ans))

N = int(eval(input()))

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

S = sum(A)

X = [0] * N

X[0] = S - 2 * sum(A[1::2])

for i in range(1, N):

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

print((*X))

N = int(eval(input()))
A = list(map(int, input().split()))
ans = [0] * N
ans[0] = sum(A) - 2 * sum(A[1 : N - 1 : 2])
for i in range(N - 1):
    ans[i + 1] = 2 * A[i] - ans[i]
print((*ans))

N = int(eval(input()))
A = list(map(int, input().split()))
S = sum(A)
X = [0] * N
X[0] = S - 2 * sum(A[1::2])
for i in range(1, N):
    X[i] = 2 * A[i - 1] - X[i - 1]
print((*X))

-ans = [0] * N -ans[0] = sum(A) - 2 * sum(A[1 : N - 1 : 2]) -for i in range(N - 1): -    ans[i + 1] = 2 * A[i] - ans[i] -print((*ans)) +S = sum(A) +X = [0] * N +X[0] = S - 2 * sum(A[1::2]) +for i in range(1, N): +    X[i] = 2 * A[i - 1] - X[i - 1] +print((*X))