N = int(input())

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

D = 0

for i in range(N):

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

two_x1 = D

for i in range(N - 1):

  print(two_x1, end = ' ')

  two_x1 = -two_x1 + 2 * A[i]

print(two_x1)

N = int(input())

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

S = 0

sign = 1

for i in range(N):

  S += sign * A[i]

  sign *= -1

for i in range(N):

  print(S, end = ' '*(i<N-1))

  S *= -1

  S += 2*A[i]

print()

N = int(input())
A = list(map(int, input().split()))
D = 0
for i in range(N):
    D += A[i] * ((-1) ** i)
two_x1 = D
for i in range(N - 1):
    print(two_x1, end=" ")
    two_x1 = -two_x1 + 2 * A[i]
print(two_x1)

N = int(input())
A = list(map(int, input().split()))
S = 0
sign = 1
for i in range(N):
    S += sign * A[i]
    sign *= -1
for i in range(N):
    print(S, end=" " * (i < N - 1))
    S *= -1
    S += 2 * A[i]
print()

-D = 0 +S = 0 +sign = 1 -    D += A[i] * ((-1) ** i) -two_x1 = D -for i in range(N - 1): -    print(two_x1, end=" ") -    two_x1 = -two_x1 + 2 * A[i] -print(two_x1) +    S += sign * A[i] +    sign *= -1 +for i in range(N): +    print(S, end=" " * (i < N - 1)) +    S *= -1 +    S += 2 * A[i] +print()