N = int(input())

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



ss = 0

for i in range(N) :

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



ans = []



for i in range(N) :

    ss = -ss + 2*A[i]

    ans.append(ss)



print('{} '.format(ans[-1]), end='')

ans.pop()



for a in ans :

    print('{} '.format(a), end='')

print('')

N = int(eval(input()))

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



S = 0

for i, a in enumerate(A):

    S += (-1)**i * a



ans = [0] * N

ans[0] = S

for i, a in enumerate(A[:-1], start=1):

    S *= -1

    S += 2 * a

    ans[i] = S



print((*ans))
N = int(input())
A = list(map(int, input().split()))
ss = 0
for i in range(N):
    ss += (-1) ** i * A[i]
ans = []
for i in range(N):
    ss = -ss + 2 * A[i]
    ans.append(ss)
print("{} ".format(ans[-1]), end="")
ans.pop()
for a in ans:
    print("{} ".format(a), end="")
print("")

N = int(eval(input()))
A = list(map(int, input().split()))
S = 0
for i, a in enumerate(A):
    S += (-1) ** i * a
ans = [0] * N
ans[0] = S
for i, a in enumerate(A[:-1], start=1):
    S *= -1
    S += 2 * a
    ans[i] = S
print((*ans))

-N = int(input()) +N = int(eval(input())) -ss = 0 -for i in range(N): -    ss += (-1) ** i * A[i] -ans = [] -for i in range(N): -    ss = -ss + 2 * A[i] -    ans.append(ss) -print("{} ".format(ans[-1]), end="") -ans.pop() -for a in ans: -    print("{} ".format(a), end="") -print("") +S = 0 +for i, a in enumerate(A): +    S += (-1) ** i * a +ans = [0] * N +ans[0] = S +for i, a in enumerate(A[:-1], start=1): +    S *= -1 +    S += 2 * a +    ans[i] = S +print((*ans))