N = int(input())

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



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

print(x1, end=' ')

for i in range(N-1):

    x1 = 2 * A[i] - x1

    print(x1, end=' ')

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(input())
A = list(map(int, input().split()))
x1 = sum(A) - 2 * sum(A[1::2])
print(x1, end=" ")
for i in range(N - 1):
    x1 = 2 * A[i] - x1
    print(x1, end=" ")

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(input()) +N = int(eval(input())) -print(x1, end=" ") +ans = [] +ans.append(x1) -    print(x1, end=" ") +    ans.append(x1) +print((*ans))