N = int(eval(input()))

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

Ans = [0]*N

for i in range(N):

  if i % 2 == 0:

    Ans[0] += List[i]

  else:

    Ans[0] -= List[i]

for i in range(1,N):

  Ans[i] = 2*List[i-1] - Ans[i-1]

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

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

ans = [0]

for i in range(N):

  if i%2==0:

    ans[0] += A[i]

  else:

    ans[0] -= A[i]

for i in range(N-1):

  ans.append(2*(A[i] - ans[i]//2))

print((*ans))
N = int(eval(input()))
List = list(map(int, input().split()))
Ans = [0] * N
for i in range(N):
    if i % 2 == 0:
        Ans[0] += List[i]
    else:
        Ans[0] -= List[i]
for i in range(1, N):
    Ans[i] = 2 * List[i - 1] - Ans[i - 1]
print((*Ans))

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

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