n = int(eval(input()))

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



x = 0

for i in range(n):

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



for i in range(n):

  if i == 0:

    print(x)

  else:

    x = 2*(a[i-1]-x//2)

    print(x)

   
n = int(eval(input()))

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



x = 0

for i in range(n):

    if i%2 == 0:

        x += A[i]

    else:

        x -= A[i]



ans = [0]*n

ans[0] = x

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]
for i in range(n):
    if i == 0:
        print(x)
    else:
        x = 2 * (a[i - 1] - x // 2)
        print(x)

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

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