from itertools import*

n=int(input())

*a,=map(int,input().split())



a*=2

*odd,=accumulate([v if k%2 else -v for k,v in enumerate(a)])

*even,=accumulate([v if k%2==0 else -v for k,v in enumerate(a)])

#print(odd)

#print(even)

for i in range(n):

    if i%2==0:

        print(even[i+n-1]-even[i]+a[i],end=" ")

    else:

        print(odd[i+n-1]-odd[i]+a[i],end=" ")

from itertools import*





n,*b=list(map(int,open(0).read().split()))



a1=sum(b[i]*(-1)**(i%2) for i in range(n))





l=[a1]

for i in range(n-1):

    l.append((b[i]-l[-1]//2)*2)

print((*l))
from itertools import *

n = int(input())
(*a,) = map(int, input().split())
a *= 2
(*odd,) = accumulate([v if k % 2 else -v for k, v in enumerate(a)])
(*even,) = accumulate([v if k % 2 == 0 else -v for k, v in enumerate(a)])
# print(odd)
# print(even)
for i in range(n):
    if i % 2 == 0:
        print(even[i + n - 1] - even[i] + a[i], end=" ")
    else:
        print(odd[i + n - 1] - odd[i] + a[i], end=" ")

from itertools import *

n, *b = list(map(int, open(0).read().split()))
a1 = sum(b[i] * (-1) ** (i % 2) for i in range(n))
l = [a1]
for i in range(n - 1):
    l.append((b[i] - l[-1] // 2) * 2)
print((*l))

-n = int(input()) -(*a,) = map(int, input().split()) -a *= 2 -(*odd,) = accumulate([v if k % 2 else -v for k, v in enumerate(a)]) -(*even,) = accumulate([v if k % 2 == 0 else -v for k, v in enumerate(a)]) -# print(odd) -# print(even) -for i in range(n): -    if i % 2 == 0: -        print(even[i + n - 1] - even[i] + a[i], end=" ") -    else: -        print(odd[i + n - 1] - odd[i] + a[i], end=" ") +n, *b = list(map(int, open(0).read().split())) +a1 = sum(b[i] * (-1) ** (i % 2) for i in range(n)) +l = [a1] +for i in range(n - 1): +    l.append((b[i] - l[-1] // 2) * 2) +print((*l))