N = int(eval(input()))

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

c = 0

for idx, i in enumerate(a):

  if idx %2 ==0:

    c += i

  else: 

    c -= i

x1 = c

print(x1)

for i in range(1,N):

  x1 = 2*a[i-1] - x1

  print(x1)
N = int(eval(input()))

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

# mountain 1 

c = sum(a[::2]) - sum(a[1::2])

print(c)

for i in range(1,N):

  # next mountains

  c = 2*a[i-1] - c

  print(c)
N = int(eval(input()))
a = list(map(int, input().split()))
c = 0
for idx, i in enumerate(a):
    if idx % 2 == 0:
        c += i
    else:
        c -= i
x1 = c
print(x1)
for i in range(1, N):
    x1 = 2 * a[i - 1] - x1
    print(x1)

N = int(eval(input()))
a = list(map(int, input().split()))
# mountain 1
c = sum(a[::2]) - sum(a[1::2])
print(c)
for i in range(1, N):
    # next mountains
    c = 2 * a[i - 1] - c
    print(c)

-c = 0 -for idx, i in enumerate(a): -    if idx % 2 == 0: -        c += i -    else: -        c -= i -x1 = c -print(x1) +# mountain 1 +c = sum(a[::2]) - sum(a[1::2]) +print(c) -    x1 = 2 * a[i - 1] - x1 -    print(x1) +    # next mountains +    c = 2 * a[i - 1] - c +    print(c)