N = int(eval(input()))

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



A += A



g_rui = [0, A[0]]

k_rui = [0, A[1]]



for i in range(2, 2*N):

    if i % 2 == 0:

        x = g_rui[-1] + A[i]

        g_rui.append(x)

    if i % 2 != 0:

        x = k_rui[-1] + A[i]

        k_rui.append(x)



# print(A)

# print(g_rui)

# print(k_rui)



for i in range(N):

    if i % 2 == 0:

        ind = i//2

        a = g_rui[ind + N//2 + 1] - g_rui[ind]

        b = k_rui[ind + N//2] - k_rui[ind]

        print((a-b))

    else:

        ind = i//2

        a = k_rui[ind + N//2 + 1] - k_rui[ind]

        # print('a', a)

        b = g_rui[ind + N//2 + 1] - g_rui[ind + 1]

        # print('b', b)

        print((a-b))    



N = int(eval(input()))

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



ans = []



x = 0

for i, ai in enumerate(A):

    if i % 2 == 0:

        x += ai

    else:

        x -= ai



ans.append(x)



for ai in A:

    x = 2 * ai - x

    ans.append(x)



ans = [str(i) for i in ans[:-1]]

print((" ".join(ans)))
N = int(eval(input()))
A = list(map(int, input().split()))
A += A
g_rui = [0, A[0]]
k_rui = [0, A[1]]
for i in range(2, 2 * N):
    if i % 2 == 0:
        x = g_rui[-1] + A[i]
        g_rui.append(x)
    if i % 2 != 0:
        x = k_rui[-1] + A[i]
        k_rui.append(x)
# print(A)
# print(g_rui)
# print(k_rui)
for i in range(N):
    if i % 2 == 0:
        ind = i // 2
        a = g_rui[ind + N // 2 + 1] - g_rui[ind]
        b = k_rui[ind + N // 2] - k_rui[ind]
        print((a - b))
    else:
        ind = i // 2
        a = k_rui[ind + N // 2 + 1] - k_rui[ind]
        # print('a', a)
        b = g_rui[ind + N // 2 + 1] - g_rui[ind + 1]
        # print('b', b)
        print((a - b))

N = int(eval(input()))
A = list(map(int, input().split()))
ans = []
x = 0
for i, ai in enumerate(A):
    if i % 2 == 0:
        x += ai
    else:
        x -= ai
ans.append(x)
for ai in A:
    x = 2 * ai - x
    ans.append(x)
ans = [str(i) for i in ans[:-1]]
print((" ".join(ans)))

-A += A -g_rui = [0, A[0]] -k_rui = [0, A[1]] -for i in range(2, 2 * N): +ans = [] +x = 0 +for i, ai in enumerate(A): -        x = g_rui[-1] + A[i] -        g_rui.append(x) -    if i % 2 != 0: -        x = k_rui[-1] + A[i] -        k_rui.append(x) -# print(A) -# print(g_rui) -# print(k_rui) -for i in range(N): -    if i % 2 == 0: -        ind = i // 2 -        a = g_rui[ind + N // 2 + 1] - g_rui[ind] -        b = k_rui[ind + N // 2] - k_rui[ind] -        print((a - b)) +        x += ai -        ind = i // 2 -        a = k_rui[ind + N // 2 + 1] - k_rui[ind] -        # print('a', a) -        b = g_rui[ind + N // 2 + 1] - g_rui[ind + 1] -        # print('b', b) -        print((a - b)) +        x -= ai +ans.append(x) +for ai in A: +    x = 2 * ai - x +    ans.append(x) +ans = [str(i) for i in ans[:-1]] +print((" ".join(ans)))