N = int(input())

A = [int(i) for i in input().split()]

a = sum(A)

i = 1

while i < N:

	a -= A[i] * 2

	i += 2

print(str(a) + ' ', end='')

i = 1

while i < N:

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

	print(str(a) + ' ', end='')

	i += 1

N = int(input())

A = [int(i) for i in input().split()]

a = sum(A)

i = 1

while i < N:

	a -= A[i] * 2

	i += 2

print(a, end=' ')

i = 1

while i < N:

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

	print(a, end=' ')

	i += 1

N = int(input())
A = [int(i) for i in input().split()]
a = sum(A)
i = 1
while i < N:
    a -= A[i] * 2
    i += 2
print(str(a) + " ", end="")
i = 1
while i < N:
    a = A[i - 1] * 2 - a
    print(str(a) + " ", end="")
    i += 1

N = int(input())
A = [int(i) for i in input().split()]
a = sum(A)
i = 1
while i < N:
    a -= A[i] * 2
    i += 2
print(a, end=" ")
i = 1
while i < N:
    a = A[i - 1] * 2 - a
    print(a, end=" ")
    i += 1

-print(str(a) + " ", end="") +print(a, end=" ") -    print(str(a) + " ", end="") +    print(a, end=" ")