N = int(eval(input()))

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

x = 0

for i in range(N):

    x += (-1)**i*A[i]

X = [x]

for i in range(N-1):

    x = 2*A[i]-x

    X.append(x)

X = [str(x) for x in X]

print((' '.join(X)))
N = int(eval(input()))

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

ans = [0]*N

ans[0] = sum([(-1)**i*A[i] for i in range(N)])

for i in range(1,N):

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

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

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

-x = 0 -for i in range(N): -    x += (-1) ** i * A[i] -X = [x] -for i in range(N - 1): -    x = 2 * A[i] - x -    X.append(x) -X = [str(x) for x in X] -print((" ".join(X))) +ans = [0] * N +ans[0] = sum([(-1) ** i * A[i] for i in range(N)]) +for i in range(1, N): +    ans[i] = 2 * A[i - 1] - ans[i - 1] +print((*ans))