N = int(eval(input()))

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



calc = 0



for i in range(0,len(A),2) :

    calc += A[i]

for i in range(1,len(A),2) :

    calc -= A[i]



p = calc//2



X = [0 for i in range(N)]

X[0] = p



for i in range(1,len(X)) :

    X[i] = A[i-1] - X[i-1]



ans = [x*2 for x in X]

print((*ans))

N = int(eval(input()))

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

X = []

ans = []

x0 = 0

for i,a in enumerate(A) :

    x0 += (a if i % 2 == 0 else -a)

x0 //= 2

X.append(x0)

ans.append(2*x0)

for i in range(1,N) :

    xi = A[i-1] - X[-1]

    X.append(xi)

    ans.append(2*xi)

print((*ans))
N = int(eval(input()))
A = list(map(int, input().split()))
calc = 0
for i in range(0, len(A), 2):
    calc += A[i]
for i in range(1, len(A), 2):
    calc -= A[i]
p = calc // 2
X = [0 for i in range(N)]
X[0] = p
for i in range(1, len(X)):
    X[i] = A[i - 1] - X[i - 1]
ans = [x * 2 for x in X]
print((*ans))

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

-calc = 0 -for i in range(0, len(A), 2): -    calc += A[i] -for i in range(1, len(A), 2): -    calc -= A[i] -p = calc // 2 -X = [0 for i in range(N)] -X[0] = p -for i in range(1, len(X)): -    X[i] = A[i - 1] - X[i - 1] -ans = [x * 2 for x in X] +X = [] +ans = [] +x0 = 0 +for i, a in enumerate(A): +    x0 += a if i % 2 == 0 else -a +x0 //= 2 +X.append(x0) +ans.append(2 * x0) +for i in range(1, N): +    xi = A[i - 1] - X[-1] +    X.append(xi) +    ans.append(2 * xi)