N = int(eval(input()))

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



t = [0] * N

t[0] = sum(A[::2]) - sum(A[1::2])

for i in range(1, N):

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

print((*list(map(str, t))))

N = int(eval(input()))

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



result = [0] * N

result[0] = sum(A[::2]) - sum(A[1::2])

for i in range(1, N):

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

print((*result))

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

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

-t = [0] * N -t[0] = sum(A[::2]) - sum(A[1::2]) +result = [0] * N +result[0] = sum(A[::2]) - sum(A[1::2]) -    t[i] = 2 * A[i - 1] - t[i - 1] -print((*list(map(str, t)))) +    result[i] = 2 * A[i - 1] - result[i - 1] +print((*result))