N = int(eval(input()))

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



x1 = sum(A) - 2 * sum(A[1::2])

ans = []

ans.append(x1)

for i in range(N-1):

    x1 = 2 * A[i] - x1

    ans.append(x1)

print((*ans))
N = int(eval(input()))

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



x1 = sum(A) - 2 * sum(A[1::2])

ans = []

ans.append(str(x1))

for i in range(N-1):

    x1 = 2 * A[i] - x1

    ans.append(str(x1))

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

N = int(eval(input()))
A = list(map(int, input().split()))
x1 = sum(A) - 2 * sum(A[1::2])
ans = []
ans.append(str(x1))
for i in range(N - 1):
    x1 = 2 * A[i] - x1
    ans.append(str(x1))
print((" ".join(ans)))

-ans.append(x1) +ans.append(str(x1)) -    ans.append(x1) -print((*ans)) +    ans.append(str(x1)) +print((" ".join(ans)))