There are n integers b_1, b_2, ..., b_{n} written in a row. For all i from 1 to n, values a_{i} are defined by the crows performing the following procedure:

  The crow sets a_{i} initially 0.  The crow then adds b_{i} to a_{i}, subtracts b_{i} + 1, adds the b_{i} + 2 number, and so on until the n'th number. Thus, a_{i} = b_{i} - b_{i} + 1 + b_{i} + 2 - b_{i} + 3.... 

Memory gives you the values a_1, a_2, ..., a_{n}, and he now wants you to find the initial numbers b_1, b_2, ..., b_{n} written in the row? Can you do it?


-----Input-----

The first line of the input contains a single integer n (2 ≤ n ≤ 100 000) — the number of integers written in the row.

The next line contains n, the i'th of which is a_{i} ( - 10^9 ≤ a_{i} ≤ 10^9) — the value of the i'th number.


-----Output-----

Print n integers corresponding to the sequence b_1, b_2, ..., b_{n}. It's guaranteed that the answer is unique and fits in 32-bit integer type.


-----Examples-----
Input
5
6 -4 8 -2 3

Output
2 4 6 1 3 

Input
5
3 -2 -1 5 6

Output
1 -3 4 11 6 



-----Note-----

In the first sample test, the crows report the numbers 6, - 4, 8, - 2, and 3 when he starts at indices 1, 2, 3, 4 and 5 respectively. It is easy to check that the sequence 2 4 6 1 3 satisfies the reports. For example, 6 = 2 - 4 + 6 - 1 + 3, and  - 4 = 4 - 6 + 1 - 3.

In the second sample test, the sequence 1,  - 3, 4, 11, 6 satisfies the reports. For example, 5 = 11 - 6 and 6 = 6.

Difficulty: EASY

Solutions:
n = int(input())
li = list(map(int, input().split()))
s = [0] * n
for i in range(n - 1):
	s[i] = li[i] + li[i + 1]
s[n - 1] = li[n - 1]
print(*s)


n = int(input())
a = list(map(int, input().split()))
b = [a[-1]]
for i in range(n - 2, -1, -1):
	b.append(a[i] + a[i + 1])
print(*list(reversed(b)))


n = int(input())
A = list(map(int, input().split())) + [0]
for i in range(n):
	print(A[i] + A[i + 1], end=' ')


n = int(input())
a = [int(x) for x in input().split()]
b = [0] * n
b[n - 1] = a[n - 1]
x = b[n - 1]
for i in range(n - 2, -1, -1):
	b[i] = a[i] + x
	x = b[i] - x
for i in b:
	print(i, end=' ')


n = int(input())
a = [int(i) for i in input().split()]
for i in range(n - 1):
	s = a[i] + a[i + 1]
	print(s, end=' ')
print(a[n - 1])


n = int(input())
a = list(map(int, input().split()))
b = [0] * (n - 1) + [a[-1]]
c = a[-1]
for j in range(n - 2, -1, -1):
	b[j] = a[j] + c
	c = -1 * (c - b[j])
print(*b)


n = int(input())
b = list(map(int, input().split()))
b.append(0)
c = [b[i] + b[i + 1] for i in range(n)]
print(*c)


n = int(input())
l = list(map(int, input().split()))
ans = [0] * n
for i in range(n - 1):
	ans[i] = l[i] + l[i + 1]
ans[-1] = l[-1]
print(*ans)


x = int(input())
l = list(map(int, input().split()))
for i in range(len(l) - 1):
	print(l[i] + l[i + 1], end=' ')
print(l[-1])


import math
n = int(input())
a = input().split()
b = [0] * n
b[n - 1] = int(a[n - 1])
for i in reversed(range(n - 1)):
	b[i] = int(a[i]) + int(a[i + 1])
ans = ''
for i in b:
	ans += str(i) + ' '
print(ans)


n = int(input())
l = list(map(int, input().split()))
p = []
for i in range(1, n):
	p.append(l[i - 1] + l[i])
p.append(l[-1])
print(*p)


3
n = int(input())
a = list(map(int, input().split()))
a.append(0)
b = [a[i] + a[i + 1] for i in range(n)]
print(' '.join(map(str, b)))


n = int(input())
sp = list(map(int, input().split()))
s1 = sp[-1]
s2 = -s1
sp = sp[::-1]
ot = [s1]
for i in range(1, n):
	if i % 2 == 1:
		ot.append(sp[i] + s1)
		s1 -= ot[-1]
		s2 += ot[-1]
	else:
		ot.append(sp[i] + s2)
		s2 -= ot[-1]
		s1 += ot[-1]
ot = ot[::-1]
for el in ot:
	print(el, end=' ')


a = int(input())
b = list(map(int, input().split())) + [0]
x = []
for i in range(a):
	x.append(b[i + 1] + b[i])
print(*x)


def memoryCrow(s):
	for i in range(len(s) - 1):
		s[i] = s[i] + s[i + 1]
	return s
n = int(input())
ss = list(map(int, input().split()))
print(*memoryCrow(ss))


def check(s):

	def recur(s, sum_left, sum_right, start, end):
		if s[start] != '7' and s[start] != '4':
			return 'NO'
		elif s[end] != '4' and s[end] != '7':
			return 'NO'
		elif start > end:
			if sum_left == sum_right:
				return 'YES'
			else:
				return 'NO'
		else:
			sum_left += int(s[start])
			sum_right += int(s[end])
			return recur(s, sum_left, sum_right, start + 1, end - 1)
	start = 0
	end = len(s) - 1
	sum_right = 0
	sum_left = 0
	return recur(s, sum_left, sum_right, start, end)

def main_function():
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	a.reverse()
	b = [str(a[0])]
	for i in range(1, len(a)):
		b.append(str(a[i - 1] + a[i]))
	b.reverse()
	return ' '.join(b)
print(main_function())


n = int(input())
s = [int(i) for i in input().split()]
d = []
for i in range(n - 1):
	d.append(s[i] + s[i + 1])
d.append(s[-1])
print(*d)


n = int(input())
ip = list(map(int, input().split()))
for i in range(n - 1):
	print(ip[i + 1] + ip[i], end=' ')
print(ip[-1])


numbers = int(input())
a = []
b = []
a = list(map(int, input().split()))
for i in range(1, numbers):
	b.append(a[i - 1] + a[i])
b.append(a[numbers - 1])
print(' '.join(list(map(str, b))))


n = int(input())
a = list(map(int, input().split()))
j = 1
b = []
for i in range(n):
	if i == n - 1:
		b += [a[i]]
	else:
		b += [a[i] + a[i + 1]]
print(' '.join(map(str, b)))


import sys, math
n = int(input())
z = list(map(int, input().split()))
z.append(0)
for i in range(n):
	print(z[i] + z[i + 1], end=' ')


n = int(input())
arr = [int(x) for x in input().split()]
brr = [arr[n - 1]]
for i in range(n - 2, -1, -1):
	x = +arr[i + 1] + arr[i]
	brr.append(x)
crr = brr[::-1]
s = str(crr[0])
for i in range(1, n):
	s += ' ' + str(crr[i])
print(s)


n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(n - 1):
	b.append(a[i] + a[i + 1])
b.append(a[n - 1])
for i in b:
	print(i, end=' ')


inp = input()
i = j = 0
arry = []
arr = []
inp1 = input().split(' ')
arry.append(inp1)
arr = arry[0]
arr2 = []
while i < len(arr) - 1:
	arr2.append(int(arr[i]) + int(arr[i + 1]))
	i += 1
arr2.append(arr[len(arr) - 1])
while j < len(arr2) - 1:
	arr2[j] = str(arr2[j])
	j += 1
print(' '.join(arr2))


n = int(input())
mat = list(map(int, input().split()))
(odd, even) = (0, 0)
for i in range(n - 1, -1, -1):
	if i % 2 == 0:
		mat[i] -= even
		mat[i] += odd
		even += mat[i]
	else:
		mat[i] += even
		mat[i] -= odd
		odd += mat[i]
print(*mat)


n = int(input())
bi = [int(x) for x in input().split(' ')]
ai = []
f = False
last = 0
for i in bi[::-1]:
	if f is False:
		ai.append(i)
		last = i
		f = True
	else:
		ai.append(last + i)
		last = i
print(' '.join([str(x) for x in ai[::-1]]))


n = int(input())
a_values = [int(i) for i in input().split()]
b = []
for i in range(1, len(a_values)):
	b_value = a_values[i] + a_values[i - 1]
	b.append(b_value)
b.append(a_values[n - 1])
print(*b)


n = int(input())
l = [int(i) for i in input().split()]
res = [0] * n
res[n - 1] = l[n - 1]
for i in range(n - 2, -1, -1):
	res[i] = l[i] + l[i + 1]
print(*res)


n = int(input())
a = list(map(int, input().split())) + [0]
b = [0] * n
b[n - 1] = a[n - 1]
for i in range(n - 1, 0, -1):
	b[i - 1] = a[i - 1] + a[i]
print(*b)


input()
data = list(map(int, input().split()))
result = [0] * len(data)
sums = [0, 0]
result[-1] = sums[(len(data) - 1) % 2] = data[-1]
sign = len(data) % 2 * 2 - 1
for i in range(len(data) - 2, -1, -1):
	delta = sign * (sums[0] - sums[1])
	result[i] = data[i] + delta
	sums[i % 2] += result[i]
	sign *= -1
print(' '.join(map(str, result)))


N = int(input())
a = list(map(int, input().split()))
b = [None] * N
memo = 0
for i in range(N)[::-1]:
	b[i] = a[i] - memo
	memo = -1 * (b[i] + memo)
print(' '.join(map(str, b)))


(n, b) = (int(input()), list(map(int, input().split())))
print(' '.join((str(b[i] + b[i + 1]) for i in range(n - 1))), b[-1])


n = int(input())
l = list(map(int, input().split()))
lp = []
for i in range(n - 1):
	lp.append(l[i] + l[i + 1])
lp.append(l[-1])
print(*lp, sep=' ')


n = int(input())
arr = list(map(int, input().split()))
for i in range(0, n):
	if i < n - 1:
		print(arr[i] + arr[i + 1], end=' ')
	else:
		print(arr[i])


n = int(input())
a = int(0)
s = input().split()
List = list(map(int, s))
for i in range(n - 1):
	print(List[i] + List[i + 1], end=' ')
print(List[n - 1])


n = int(input())
a = [int(i) for i in input().split()]
l = []
for i in range(n - 1):
	l.append(a[i] + a[i + 1])
l = l + [a[-1]]
print(*l)


n = int(input())
b = list(map(int, input().split()))
b.reverse()
a = [0] * n
a[0] = b[0]
ch = 0
for i in range(1, len(b)):
	a[i] = b[i - 1] + b[i]
a.reverse()
for i in a:
	print(i, end=' ')


non = int(input())
text = input()
numbers = text.split()
sum = []
for i in range(len(numbers) - 1):
	a = int(numbers[i]) + int(numbers[i + 1])
	sum.append(a)
sum.append(numbers[len(numbers) - 1])
for item in sum:
	print(item, end=' ')


import sys
fin = sys.stdin
fout = sys.stdout
n = int(fin.readline())
a = list(map(int, fin.readline().split()))
res = [a[-1]]
for i in range(n - 2, -1, -1):
	res.append(a[i + 1] + a[i])
res.reverse()
fout.write(' '.join(map(str, res)))


n = int(input())
al = list(map(int, input().split())) + [0]
bl = []
for i in range(n):
	bl += [str(al[i] + al[i + 1])]
print(' '.join(bl))


t = int(input())
x = [int(a) for a in input().split(' ')]
for i in range(0, t - 1):
	print(x[i] + x[i + 1], end=' ')
print(x[t - 1])


n = int(input())
a = list(map(int, input().split()))
print(' '.join([str(x + y) for (x, y) in zip(a[1:], a[:-1])] + [str(a[-1])]))


n = int(input())
a = [int(i) for i in input().split()]
b = [0] * n
r = []
for i in range(n - 1):
	b[i] = a[i] + a[i + 1]
	print(b[i], end=' ')
print(a[n - 1])


n = int(input())
Arr = list(map(int, input().split()))
b = [0 for i in range(n)]
S = ''
for i in range(n):
	if i < n - 1:
		b[i] = Arr[i] + Arr[i + 1]
	else:
		b[i] = Arr[i]
	S += str(b[i])
	S += ' '
print(S)


a = int(input())
b = list(map(int, input().split()))
z = 0
v = [b[-1]]
fr = b[-1]
sc = 0
if a % 2 != 0:
	for i in range(a - 2, -1, -1):
		if i % 2 != 0:
			z -= fr
			z += sc
			sc += b[i] - z
		else:
			z += fr
			z -= sc
			fr += b[i] - z
		v.append(b[i] - z)
		z = 0
else:
	for i in range(a - 2, -1, -1):
		if i % 2 != 0:
			z += fr
			z -= sc
			fr += b[i] - z
		else:
			z -= fr
			z += sc
			sc += b[i] - z
		v.append(b[i] - z)
		z = 0
v.reverse()
print(*v)


def main():
	count = int(input())
	numbers = list(map(int, str(input()).split(' ')))
	revnumbers = list(reversed(numbers))
	revans = [1]
	revans[0] = revnumbers[0]
	for i in range(1, count):
		revans.append(revnumbers[i - 1] + revnumbers[i])
	print(' '.join(list(map(str, reversed(revans)))))
main()


n = int(input())
l = list(map(int, input().split()))
v = []
l.append(0)
for i in range(n):
	v.append(l[i] + l[i + 1])
print(*v)


n = int(input())
l = list(map(int, input().split()))
s = ''
for i in range(n - 1):
	s += str(l[i] + l[i + 1]) + ' '
s += str(l[n - 1])
print(s)


n = int(input())
l = list(map(int, input().split()))
res = []
for i in range(n - 1):
	res.append(l[i] + l[i + 1])
if len(res) != n:
	res.append(l[-1])
print(*res)


N = int(input())
i = 0
s = input().split()
A = list(map(int, s))
B = [0] * N
while i < N - 1:
	B[i] = A[i] + A[i + 1]
	i = i + 1
B[N - 1] = A[N - 1]
i = 0
while i < N:
	print(B[i], end=' ')
	i = i + 1


n = int(input())
a = [int(x) for x in input().split()]
b = []
for i in range(n - 1):
	b.append(a[i] + a[i + 1])
b.append(a[n - 1])
for x in b:
	print(x, end=' ')


n = int(input())
ar = [int(i) for i in input().split()]
for i in range(n - 1):
	print(ar[i] + ar[i + 1], end=' ')
print(ar[n - 1])


n = int(input())
r = [int(x) for x in input().split()] + [0]
a = []
for i in range(n):
	a.append(r[i] + r[i + 1])
print(' '.join([str(x) for x in a]))


n = int(input())
a = list(map(int, input().split()))
for i in range(len(a) - 1):
	print(a[i] + a[i + 1], end=' ')
print(a[i + 1])


n = int(input())
a = input().split()
t = ''
for i in range(n - 1):
	t += str(int(a[i]) + int(a[i + 1])) + ' '
t += a[n - 1]
print(t)


n = int(input())
A = list(map(int, input().split()))
answer = [0] * n
for i in range(len(A) - 1, -1, -1):
	if i == len(A) - 1:
		answer[i] = A[i]
	else:
		answer[i] = A[i] + A[i + 1]
print(' '.join(map(str, answer)))


n = int(input())
a = list(map(int, input().split()))
b = []
for (a1, a2) in zip(a, a[1:] + [0]):
	b.append(a1 + a2)
print(*b)


n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n - 1, -1, -1):
	if i == n - 1:
		ans[i] = a[i]
	else:
		ans[i] = a[i] + a[i + 1]
for i in ans:
	print(i, end=' ')


n = int(input())
l = list(map(int, input().split()))
res = [l[0]] + [0] * (n - 1)
for i in range(1, n):
	res[i] = l[i]
	res[i - 1] = res[i - 1] + l[i]
print(' '.join(map(str, res)))


n = int(input())
l = list(map(int, input().strip().split(' ')))
l1 = []
for i in range(n - 1):
	l1.append(l[i] + l[i + 1])
l1.append(l[n - 1])
print(*l1)


n = int(input())
s = list(map(int, input().split()))
l = s[::-1]
g = [l[0]]
for k in range(n - 1):
	g.append(l[k] + l[k + 1])
print(*g[::-1])


n = int(input())
l = list(map(int, input().split()))
for x in range(n):
	if x == n - 1:
		print(l[x])
	else:
		print(l[x] + l[x + 1], end=' ')


n = int(input())
l_n = list(map(int, input().split()))
c_s = 0
for i in range(len(l_n)):
	l_n[len(l_n) - i - 1] += c_s
	c_s = -c_s
	c_s += l_n[len(l_n) - i - 1]
print(' '.join((str(x) for x in l_n)))


import sys

def main():
	s = list(map(int, sys.stdin.read().strip().split()[1:]))
	return [i + j for (i, j) in zip(s, s[1:])] + [s[-1]]
print(*main())


n = int(input())
numbers = list(map(int, input().split()))
result = []
for i in range(1, n):
	otvet = numbers[i - 1] - numbers[i] * -1
	result.append(otvet)
result.append(numbers[n - 1])
print(*result)


n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(n - 2, -1, -1):
	bi = a[i + 1] + a[i]
	b.append(bi)
b.reverse()
b.append(a[n - 1])
print(' '.join([str(i) for i in b]))


n = int(input())
a = list(map(int, input().split()))
b = [0] * n
sumi = 0
for i in range(n - 1, -1, -1):
	b[i] = a[i] + sumi
	sumi = -sumi + b[i]
for p in b:
	print(p, end=' ')


import sys
fin = sys.stdin
n = int(fin.readline())
a = [int(x) for x in fin.readline().split()]
b = [0] * n
sum = 0
for i in reversed(range(len(a))):
	b[i] = str(a[i] + sum)
	sum = a[i]
print(' '.join(b))


t = int(input())
a = list(map(int, input().split()))
i = 0
l = []
while i <= t - 2:
	x = a[i] + a[i + 1]
	l.append(x)
	i = i + 1
l.append(a[-1])
print(*l)


n = int(input())
l = list(map(int, input().split()))
a = [0] * n
for i in range(n - 1, -1, -1):
	if i == n - 1:
		a[i] = l[i]
	else:
		a[i] = l[i] + l[i + 1]
print(*a)


import sys
n = int(input())
an = list(map(int, sys.stdin.readline().split()))
bn = [0] * n
bn[n - 1] = an[n - 1]
i = n - 2
while i >= 0:
	bn[i] = an[i] + an[i + 1]
	i -= 1
print(' '.join(map(str, bn)))


size = int(input())
array = list(map(int, input().split()))
for i in range(size - 1):
	print(array[i] + array[i + 1], end=' ')
print(array[-1])


T_ON = 0
DEBUG_ON = 0
MOD = 998244353

def solve():
	n = read_int()
	A = read_ints()
	B = A[:]
	for i in range(n - 1):
		B[i] += A[i + 1]
	print_nums(B)

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def lcm(a, b):
	d = gcd(a, b)
	return a * b // d

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


n = int(input())
ik = list(map(int, input().split()))[::-1]
res = [ik[0]]
for i in range(n - 1):
	res.append(ik[i] + ik[i + 1])
print(*res[::-1])


n = int(input())
l = list(map(int, input().split()))
S = []
for i in range(n - 1):
	S.append(str(l[i] + l[i + 1]))
S.append(str(l[n - 1]))
print(' '.join(S))


N = int(input())
L = list(map(int, input().split()))
for i in range(N - 1):
	print(L[i] + L[i + 1], end=' ')
print(L[N - 1])


n = int(input())
l = [int(x) for x in input().split(' ')]
for i in range(len(l) - 1):
	print(l[i] + l[i + 1], end=' ')
print(l[-1])


from collections import Counter
import string
import math
import sys

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(number_of_variables):
	if number_of_variables == 1:
		return int(sys.stdin.readline())
	if number_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
mod = 100000007
n = vary(1)
num = array_int()
for i in range(n - 1):
	print(num[i] + num[i + 1], end=' ')
print(num[-1])


import sys
n = int(input())
a = list(map(int, sys.stdin.readline().split()))
a.append(0)
b = [str(a[i] + a[i + 1]) for i in range(n)]
print(' '.join(b))


def _a():
	n = int(input())
	a = [int(i) for i in input().split()]
	a_len = len(a)
	s = [''] * a_len
	s[-1] = a[-1]
	for i in range(a_len - 2, -1, -1):
		s[i] = a[i] + a[i + 1]
	print(*s)
_a()

def _b():
	s = input()
	x = [0, 0]
	for i in s:
		if i == 'U':
			x[0] += 1
		elif i == 'D':
			x[0] -= 1
		elif i == 'R':
			x[1] += 1
		elif i == 'L':
			x[1] -= 1
	if x[1] + x[0] <= 2:
		print(1)
	else:
		print(-1)


lg = int(input())
a = list(map(int, input().split()))
for i in range(lg):
	if i == len(a) - 1:
		print(a[i])
	else:
		print(a[i] + a[i + 1], end=' ')


n = int(input())
A = list(map(int, input().split()))
L = []
L.append(A[n - 1])
cnt = 0
for i in range(n):
	r = A[n - i - 1] + A[n - i - 2]
	cnt += 1
	if cnt == n:
		break
	L.append(r)
L.reverse()
print(*L)


num = input()
numlist = input().split(' ')
outlist = []
for i in range(int(num) - 1):
	outlist.append(int(numlist[i]) + int(numlist[i + 1]))
outlist.append(int(numlist[-1]))
print(' '.join(map(str, outlist)))


k = int(input())
n = input().split()
for i in range(k):
	n[i] = int(n[i])
if k >= 2 and k <= 100000:
	for i in range(0, k - 1):
		n[i] = int(n[i]) + int(n[i + 1])
		print(n[i], '', end='')
	print(n[k - 1])


from math import *
n = int(input())
l = list(map(int, input().split()))
l.append(0)
x = [0] * n
for i in range(n - 1, -1, -1):
	x[i] = l[i] + l[i + 1]
print(*x)


n = int(input())
b = list(map(int, input().split()))
b.append(0)
a = map(lambda x, y: str(x + y), b, b[1:])
print(' '.join(a))


input()
a = list(map(int, input().split()))
diff_sum = 0
b = []
for (i, ai) in enumerate(a[::-1]):
	bi = ai - (1 if i % 2 == 0 else -1) * diff_sum
	diff_sum += (1 if i % 2 == 0 else -1) * bi
	b.append(bi)
print(' '.join(map(str, reversed(b))))


n = int(input())
L = [int(x) for x in input().split()]
for i in range(1, n):
	print(L[i] + L[i - 1], end=' ')
print(L[-1])


n = int(input())
t = tuple(map(int, input().split()))
for i in range(1, n):
	print(t[i - 1] + t[i], end=' ')
print(t[-1])


from sys import stdin, stdout, stderr, setrecursionlimit
setrecursionlimit(100000)

def debug(*e):
	if not __debug__:
		print(*e, file=stderr)

def dd(*vals):
	import inspect, re
	frame = inspect.getframeinfo(inspect.stack()[1][0])
	vs = re.search('dd\\((.+)\\)', frame.code_context[0]).group(1).split(',')
	if vs:
		debug(','.join(('{0} = {1}'.format(vs[i], v) for (i, v) in enumerate(vals))))

def trace(f):

	def traced(*args, **kw):
		debug('calling {} with args {}, {}'.format(f.__name__, args, kw))
		return f(*args, **kw)
	return traced

def read():
	return stdin.readline().rstrip()

def readarr(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readia(sep=None, maxsplit=-1):
	return [int(a) for a in readarr(sep, maxsplit)]

def write(*args, **kwargs):
	sep = kwargs.get('sep', ' ')
	end = kwargs.get('end', '\n')
	stdout.write(sep.join((str(a) for a in args)) + end)

def writea(arr, sep=' ', end='\n'):
	stdout.write(sep.join((str(a) for a in arr)) + end)
n = readint()
a = readia()
a.append(0)
b = [0] * (n + 1)
for i in range(n - 1, -1, -1):
	b[i] = a[i] + b[i + 1] + a[i + 1] - b[i + 1]
writea(b[:-1])


n = int(input())
ai = list(map(int, input().split()))
bi = [0] * n
bi[n - 1] = ai[n - 1]
for i in range(n - 2, -1, -1):
	bi[i] = ai[i] + ai[i + 1]
for i in range(n):
	print(bi[i], end=' ')


n = int(input())
l = list(map(int, input().split()))
k = []
r = 0
for i in range(len(l)):
	if i == len(l) - 1:
		r = l[len(l) - 1]
		print(r, end=' ')
	else:
		r = l[i + 1] + l[i]
		print(r, end=' ')


n = int(input())
v = [int(i) for i in input().split()]
b = [v[i] + v[i + 1] for i in range(n - 1)]
b.append(v[-1])
for i in range(n):
	print(b[i], end=' ')


n = int(input())
numbers = [int(x) for x in input().split()]
ans = [0] * n
ans[n - 1] = numbers[n - 1]
for i in reversed(range(n - 1)):
	ans[i] = numbers[i + 1] + numbers[i]
for an in ans:
	print(an, end=' ')
print()


n = int(input())
targetList = [int(x) for x in input().split()]
for i in range(0, n - 1):
	print(targetList[i] + targetList[i + 1], end=' ')
print(targetList[n - 1])


def this_is_b(a, n):
	for i in range(n - 1):
		a[i] = a[i + 1] + a[i]
	return a
n = int(input())
a = [int(i) for i in input().split()]
for i in this_is_b(a, n):
	print(i, end=' ')


n = int(input())
q = [int(x) for x in input().split()]
ans = []
for i in range(n):
	if i == n - 1:
		ans.append(q[i])
		break
	ans.append(q[i] + q[i + 1])
print(' '.join(map(str, ans)))


def main():
	from sys import stdin, stdout
	n = int(stdin.readline())
	a = tuple(map(int, stdin.readline().split()))
	l = []
	for i in range(n):
		if i == n - 1:
			l.append(a[i])
		else:
			l.append(a[i] + a[i + 1])
	for i in l:
		stdout.write(str(i) + ' ')
main()


def main():
	n = int(input())
	a = [int(_) for _ in input().split()]
	b = ['0'] * n
	b[n - 1] = str(a[n - 1])
	for i in range(n - 2, -1, -1):
		b[i] = str(a[i] + a[i + 1])
	print(' '.join(b))
main()


n = int(input())
an = input().split()
for i in range(n):
	an[i] = int(an[i])
for i in range(n - 1):
	an[i] = an[i] + an[i + 1]
	an[i] = str(an[i])
an[n - 1] = str(an[n - 1])
print(' '.join(an))


n = int(input())
l = list(map(int, input().split()))
sums = [0]
for i in range(n - 2, -1, -1):
	g = l[i + 1] - sums[-1]
	l[i] = l[i] + g
	sums.append(g)
for i in l:
	print(i, end=' ')


num = int(input())
arr = list(map(int, input().split())) + [0]
ans = []
for i in range(num):
	ans.append(arr[i] + arr[i + 1])
print(*ans)


input()
b = list(map(int, input().split())) + [0]
print(*(b[i - 1] + b[i] for i in range(1, len(b))))


x = int(input())
t = 0
a = list(map(int, input().split()))
z = [0] * len(a)
z[0] = a[len(a) - 1]
s = a[len(a) - 1]
for i in range(1, len(a)):
	if i % 2 == 1:
		z[i] = a[len(a) - i - 1] + s
	else:
		z[i] = a[len(a) - i - 1] - s
	if i % 2 == 1:
		s = s - z[i]
	else:
		s = s + z[i]
for i in range(len(z) - 1, -1, -1):
	print(z[i], end=' ')


x = int(input())
y = list(map(int, input().split()))
for i in range(x - 1):
	print(y[i] + y[i + 1], end=' ')
print(y[x - 1])


def solve(n, a):
	a.append(0)
	b = [str(a[i - 1] + a[i]) for i in range(1, n + 1)]
	return ' '.join(b)

def main():
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(n, a))
main()


N = int(input())
A = list(map(int, input().split()))
Ans = []
for i in range(N - 1):
	Ans.append(A[i] + A[i + 1])
Ans.append(A[len(A) - 1])
print(*Ans)


import sys
import math
import bisect
import itertools
import random

def main():
	n = int(input())
	A = list(map(int, input().split()))
	B = [0] * n
	for i in range(n - 1):
		B[i] = A[i] + A[i + 1]
	B[n - 1] = A[n - 1]
	print(' '.join(list((str(a) for a in B))))
main()


n = int(input())
a = list(map(int, input().split()))
ans = [a[n - 1]]
for i in range(n - 2, -1, -1):
	ans.append(a[i] + a[i + 1])
print(' '.join([str(x) for x in ans[::-1]]))


n = int(input())
l = list(map(int, input().split()))
l.append(0)
for x in range(0, len(l) - 1):
	print(l[x] + l[x + 1], end=' ')


n = int(input())
l = list(map(int, input().split()))
l1 = []
for i in range(n - 1):
	x = l[i] + l[i + 1]
	l1.append(x)
l1.append(l[-1])
for i in l1:
	print(i, end=' ')


input()
A = list(map(int, input().split()))
for (x, y) in zip(A, A[1:] + [0]):
	print(x + y, end=' ')


from sys import stdin
n = int(stdin.readline().strip())
s = list(map(int, stdin.readline().strip().split()))
ans = []
for i in range(n - 1):
	ans.append(s[i] + s[i + 1])
ans.append(s[-1])
print(*ans)


def main():
	n = int(input())
	arr = list(map(int, input().split()))
	arr.append(0)
	ans = []
	for i in range(n):
		ans.append(arr[i] + arr[i + 1])
	print(*ans)
main()


a = int(input())
b = list(map(int, input().split()))
for x in range(a - 1):
	print(b[x] + b[x + 1], end=' ')
print(b[-1], end='')


n = int(input())
list1 = input().split()
final = ''
for i in range(len(list1) - 1):
	final += str(int(list1[i]) + int(list1[i + 1])) + ' '
final += str(list1[len(list1) - 1])
print(final)


n = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(n - 1):
	ans.append(a[i] + a[i + 1])
ans.append(a[-1])
print(*ans)


n = int(input())
string = input()
values = string.split(' ')
for x in range(n):
	values[x] = int(values[x])
numbers = []
for x in range(n - 1):
	numbers.append(str(values[x] + values[x + 1]))
numbers.append(str(values[n - 1]))
print(' '.join(numbers))


f = lambda : map(int, input().split())
n = int(input())
l = list(f())
for i in range(0, n - 1):
	print(l[i] + l[i + 1], end=' ')
print(l[-1])


n = int(input())
l = [int(e) for e in input().split()]
ch = ''
for i in range(1, n):
	ch += str(l[i - 1] + l[i]) + ' '
print(ch + str(l[-1]))


n = int(input())
a = [int(x) for x in input().split()]
b = [0] * n
s = 0
for i in range(n - 1, -1, -1):
	b[i] = a[i] + s
	s = -s + b[i]
print(' '.join((repr(e) for e in b)))


I = input
n = int(I())
a = list(map(int, I().split())) + [0]
for i in range(n):
	print(a[i] + a[i + 1], end=' ')


import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
ARR = lambda : list(map(int, input().split()))

def main():
	n = I()
	arr = ARR()
	ans = [0] * n
	ans[-1] = arr[-1]
	for i in range(n - 2, -1, -1):
		ans[i] = arr[i] + arr[i + 1]
	for e in ans:
		print(e, end=' ')
main()


n = int(input())
a = list(map(int, input().split()))
tmp = 0
tmp2 = 0
for i in range(n - 1):
	a[i] = a[i] + a[i + 1]
print(*a)


n = int(input())
a_l = list(map(int, input().split()))
b_l = [a_l[i] + a_l[i + 1] for i in range(n - 1)]
b_l.append(a_l[n - 1])
print(*b_l)


input()
a = [int(i) for i in input().split()]
for i in range(1, len(a)):
	print(a[i - 1] + a[i], end=' ')
print(a[-1])


n = int(input())
a = list(map(int, input().split()))[::-1]
arr = [a[0]]
for i in range(1, n):
	arr.append(a[i] + a[i - 1])
arr.reverse()
for item in arr:
	print(item, end=' ')


n = int(input())
L = list(map(int, input().split()))
R = [0 for _ in range(n)]
R[n - 1] = L[n - 1]
t = L[n - 1]
for i in range(n - 2, -1, -1):
	if 1:
		R[i] = L[i] + t
		t = R[i] - t
for i in range(n):
	print(R[i], end=' ')


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	l = LI()
	ans = []
	for i in range(n - 1):
		ans.append(l[i] + l[i + 1])
	ans.append(l[-1])
	return ' '.join((str(x) for x in ans))
print(main())


n = int(input())
a = [int(z) for z in input().split()]
b = [0] * n
s = 0
for i in range(n - 1, -1, -1):
	a[i] += s
	b[i] = a[i]
	s -= b[i]
	s *= -1
print(' '.join(map(str, b)))


n = int(input())
l = []
l.extend(map(int, input().split()))
l.append(0)
for i in range(n):
	print(l[i] + l[i + 1], end=' ')


num = int(input())
l = list(map(int, input().split()))
for i in range(len(l)):
	if i == len(l) - 1:
		print(l[i])
		break
	else:
		print(l[i] + l[i + 1], end=' ')


from math import *
n = int(input())
a = input().split()
s = list(map(int, a))
B = [0] * n
for i in range(n - 1):
	B[i] = s[i] + s[i + 1]
B[n - 1] = s[n - 1]
for i in range(n):
	print(B[i], end=' ')


n = int(input())
x = list(map(int, input().split()))
l = []
for i in range(1, n + 1):
	a = -i
	if len(l) == 0:
		l.append(x[a])
	else:
		l.append(x[a] + x[a + 1])
l = l[::-1]
l = list(map(str, l))
print(' '.join(l))


import math
import string

def main():
	n = int(input())
	b = list(map(int, input().split()))
	a = [b[i + 1] + b[i] for i in range(n - 1)] + [b[-1]]
	print(' '.join(map(str, a)))
main()


n = int(input())
b = list(map(int, input().split()))
t = 0
for i in reversed(range(n)):
	b[i] = b[i] + t
	t = b[i] - t
for x in b:
	print(x, end=' ')


def solution(l1):
	i = 0
	while i < len(l1) - 1:
		l1[i] = str(int(l1[i]) + int(l1[i + 1])) + ' '
		i += 1
	c_out = ''.join(l1)
	return c_out

def answer():
	a = int(input())
	l1 = input().split()
	print(solution(l1))
answer()


n = int(input())
line = str(input()).split()
line = [int(it) for it in line]
temp = list()
for i in range(n - 1):
	temp.append(line[i] + line[i + 1])
temp.append(line[-1])
temp = [str(it) for it in temp]
print(' '.join(temp))


n = int(input())
l = [int(x) for x in input().split()]
f = [0] * n
f[-1] = l[-1]
for k in range(n - 1):
	i = n - k - 2
	f[i] = l[i] + l[i + 1]
print(*f)


input()
data = [int(info) for info in input().split(' ')]
data = list(reversed(data))
output = [data[0]]
for (i, e) in enumerate(data[1:]):
	output.append(data[i + 1] + data[i])
print(' '.join([str(info) for info in reversed(output)]))


N = int(input())
As = [int(x) for x in input().split(' ') if len(x) > 0]
prev_a = As[0]
for a in As[1:]:
	print(prev_a + a, end=' ')
	prev_a = a
print(prev_a)


n = int(input())
vector = list(map(int, input().split(' ')))
lista = []
for i in range(0, n - 1):
	lista.append(vector[i] + vector[i + 1])
	if i == n - 2:
		lista.append(vector[-1])
lista = map(str, lista)
print(' '.join(lista))


n = int(input())
b = list(map(int, input().split()))
t = 0
for i in reversed(range(n)):
	b[i] = b[i] + t
	t = b[i] - t
	b[i] = str(b[i])
print(' '.join(b))


input()
A = list(map(int, input().split()))
B = [0] * len(A)
B[-1] = A[-1]
for i in range(len(B) - 2, -1, -1):
	B[i] = A[i] + A[i + 1]
for b in B:
	print(b, end=' ')


n = int(input())
lst = [int(i) for i in input().split()]
for i in range(n - 1):
	print(lst[i] + lst[i + 1], end=' ')
print(lst[n - 1])


n = int(input())
a = list(map(int, input().split()))
b = [i + j for (i, j) in zip(a, a[1:])]
b.append(a[-1])
print(*b, sep=' ')


(n,) = map(int, input().split())
a = list(map(int, input().split()))
b = [0 for _ in range(n)]
b[n - 1] = a[n - 1]
for i in range(n - 2, -1, -1):
	b[i] = a[i] + a[i + 1]
print(' '.join(map(str, b)))


n = int(input())
l = [int(x) for x in input().split()] + [0]
print(*[x + y for (x, y) in zip(l, l[1:])])


n = int(input())
a = list(map(int, input().split()))
res = [a[i + 1] + a[i] for i in range(n - 1)] + [a[n - 1]]
print(' '.join(map(str, res)))


import sys

def read_data():
	n = int(next(sys.stdin).strip())
	numbers = list(map(int, next(sys.stdin).split()))[:n]
	return numbers

def solve(numbers):
	ans = numbers.copy()
	for i in range(len(numbers) - 1):
		ans[i] += numbers[i + 1]
	return ans
numbers = read_data()
print(' '.join(map(str, solve(numbers))))


n = int(input())
arr = list(map(int, input().split()))
b = [0] * n
b[n - 1] = arr[n - 1]
for i in range(n - 2, -1, -1):
	b[i] = arr[i] + arr[i + 1]
print(*b)


z = input
n = int(z())
l = list(map(int, z().split()))
x = l[0]
nl = []
for i in l[1:]:
	nl.append(x + i)
	x = i
nl.append(l[-1])
print(*nl)


def main():
	(n, s) = (int(input()), 0)
	l = list(map(int, input().split()))
	for i in range(n - 1, -1, -1):
		a = l[i]
		l[i] = b = a + s
		s = b - s
	print(' '.join(map(str, l)))
main()


n = int(input())
s = input().split()
i = int(0)
A = list(map(int, s))
B = list(range(n))
while i != n - 1:
	B[i] = A[i] + A[i + 1]
	i = i + 1
B[i] = A[i]
for i in B:
	print(i, end=' ')


input()
a = [int(x) for x in input().split()] + [0]
print(' '.join([str(a[i] + a[i - 1]) for i in range(1, len(a))]))


n = int(input())
a = list(map(int, input().split()))
b = [0] * n
b[-1] = a[-1]
i = n - 2
while i > -1:
	b[i] = a[i + 1] + a[i]
	i -= 1
for i in b:
	print(i, end=' ')


n = int(input())
list_num = [int(x) for x in input().split()]
for a in range(n):
	if n != a + 1:
		b = list_num[a] + list_num[a + 1]
		print(str(b), end=' ')
	else:
		print(list_num[a])


n = int(input())
arry = [int(a) for a in input().split()]
ary1 = [arry[i] + arry[i + 1] for i in range(0, len(arry) - 1)]
print(*ary1, arry[len(arry) - 1])


import sys

def main():
	n = int(input())
	a = list(map(int, input().split(' ')))
	a.append(0)
	b = list((a[i] + a[i + 1] for i in range(n)))
	for i in range(n):
		print(b[i], end='')
		print(' ' if i < n - 1 else '\n', end='')
main()


n = int(input())
if n != 0:
	s = [int(S) for S in input().split()]
	for i in range(n - 1):
		print(s[i] + s[i + 1], end=' ')
	print(s[n - 1])


input()
a = [*map(int, input().split()), 0]
print(*[x + y for (x, y) in zip(a, a[1:])])


N = int(input())
A = list(map(int, input().split()))
mem = 0
B = []
for i in range(N - 1, -1, -1):
	b = A[i] + mem
	B.append(b)
	mem = -mem
	mem += b
print(' '.join(map(str, B[::-1])))


x = int(input())
a = list(map(int, input().split()))
print(*[a[i] + a[i + 1] for i in range(x - 1)], a[-1])


n = int(input())
al = list(map(int, input().split())) + [0]
print(*[al[i] + al[i + 1] for i in range(n)])


n = int(input())
lis = list(map(int, input().split()))
lis2 = []
for i in range(0, len(lis) - 1):
	lis2.append(lis[i] + lis[i + 1])
lis2.append(lis[len(lis) - 1])
for i in lis2:
	print(i, end=' ')


read = lambda : map(int, input().split())
n = int(input())
a = list(read())
dif = [a[i + 2] - a[i] for i in range(n - 2)]
b = [0] * n
b[n - 1] = a[n - 1]
b[n - 2] = a[n - 1] + a[n - 2]
for i in range(n - 3, -1, -1):
	b[i] = b[i + 1] - dif[i]
print(*b)


input()
c = 0
a = []
for x in [*map(int, input().split())][::-1]:
	a += [x - c]
	c = -c - a[-1]
print(*a[::-1])


n = int(input())
arr = [int(i) for i in input().split()]
ans = []
res = 0
for i in range(1, n):
	res = arr[i - 1] + arr[i]
	ans.append(res)
	res = 0
ans.append(arr[-1])
print(' '.join([str(i) for i in ans]))


n = int(input())
arr = list(map(int, input().split()))
arr.reverse()
res = []
s = 0
for i in arr:
	res.append(i - s)
	s += res[-1]
	s *= -1
print(' '.join(map(str, reversed(res))))


n = int(input())
inp = list(map(int, input().split()))
for i in range(0, n - 1):
	print(inp[i] + inp[i + 1], end=' ')
print(inp[len(inp) - 1])


input()
X = list(map(int, input().split()))
for i in range(len(X) - 1):
	print(X[i] + X[i + 1], end=' ')
print(X[-1])


no_of_integers = int(input())
integers = list(map(int, input().split()))
original_integers = []
for i in range(no_of_integers - 1):
	original_integers.append(str(integers[i] + integers[i + 1]))
print(' '.join(original_integers) + ' ' + str(integers[-1]))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	a = LI()
	b = []
	t = 0
	for c in a[::-1]:
		b.append(c + t)
		t = c
	return ' '.join(map(str, b[::-1]))
print(main())


n = int(input())
lst = list(map(int, input().split()))
result = [0] * n
result[-1] = lst[-1]
for i in range(n - 2, -1, -1):
	result[i] = lst[i] + lst[i + 1]
print(*result)


from math import *
n = int(input())
b = list(map(int, input().split()))
a = []
a.append(b[n - 1])
for i in range(n - 1, 0, -1):
	a.append(b[i] + b[i - 1])
a.reverse()
for i in a:
	print(i, end=' ')


n = int(input())
li = list(map(int, input().split()))[:n]
r_li = []
for i in range(1, len(li)):
	if i % 2 == 1:
		sum = li[i] + li[i - 1]
	else:
		sum = li[i - 1] + li[i]
	r_li.append(sum)
r_li.append(li[len(li) - 1])
print(*r_li, sep=' ')


import math, sys, re, itertools
(rs, ri, rai) = (input, lambda : int(input()), lambda : list(map(int, input().split())))
n = ri()
a = rai()
b = [0] * n
b[-1] = a[-1]
for i in reversed(range(n - 1)):
	b[i] = a[i] + a[i + 1]
print(' '.join(map(str, b)))


import copy
n = int(input())
a = [int(n) for (i, n) in enumerate(input().split(' '))]
b = []
s = ''
for i in range(n - 1, -1, -1):
	x = a[i]
	if i < n - 1:
		x += a[i + 1]
	b.append(x)
for i in range(len(b) - 1, -1, -1):
	s += str(b[i]) + ' '
print(s)


t = input
p = print
r = range
n = int(t())
a = list(map(int, t().split()))
b = [0] * n
for i in range(n - 1):
	b[i] = a[i] + a[i + 1]
b[n - 1] = a[n - 1]
print(' '.join(map(str, b)))


n = int(input())
mas = list(map(int, input().split()))
temp = []
mas.reverse()
temp = [mas[0]]
for i in range(n - 1):
	c = mas[i] + mas[i + 1]
	temp.append(c)
for i in range(len(temp) - 1, -1, -1):
	print(temp[i], end=' ')


n = int(input())
l = list(map(int, input().split()))
s = 0
for i in range(len(l) - 1):
	l[i] = l[i] + l[i + 1]
print(*l)


n = int(input())
l = list(map(int, input().split()))
r = []
t = 0
for (i, x) in enumerate(l[::-1]):
	if i % 2:
		r.append(str(t + x))
		t = -x
	else:
		r.append(str(x - t))
		t = x
print(' '.join(r[::-1]))


testcase = int(input())
list = list(map(int, input().split()))[:testcase]
anotherList = []
for i in range(1, len(list)):
	anotherList.append(list[i - 1] + list[i])
anotherList.append(list[len(list) - 1])
print(*anotherList, sep=' ')


n = int(input())
l = list(map(int, input().split()))
ans = []
ans.append(l[n - 1])
i = n - 1
j = i - 1
while len(ans) != len(l):
	ans.append(l[i] + l[j])
	i = i - 1
	j = i - 1
ans = ans[::-1]
print(*ans)


n = int(input())
k = list(map(int, input().split()))
i = 1
while i < n:
	print(k[i] + k[i - 1], '', end='')
	i = i + 1
print(k[n - 1])


n = int(input())
crow = [int(x) for x in input().split()] + [0]
was = []
for i in range(n):
	was.append(crow[i] + crow[i + 1])
print(*was)


def crows(lst1):
	lst2 = [0] * len(lst1)
	lst2[len(lst1) - 1] = lst1[len(lst1) - 1]
	for i in range(len(lst1) - 2, -1, -1):
		if i + 1 < len(lst1):
			lst2[i] = lst1[i + 1] + lst1[i]
	return lst2
n = int(input())
a = [int(j) for j in input().split()]
print(*crows(a))


import sys
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
from collections import Counter
import collections
import math
import heapq
import re

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def most_frequent(list):
	return max(set(list), key=list.count)

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def Convert(string):
	li = list(string.split(''))
	return li

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
prime = []
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def main():
	n = inin()
	a = ain()
	flag = 1
	a.append(0)
	if n % 2 == 0:
		flag = -1
	b = [0] * (n + 1)
	for i in range(n - 1, -1, -1):
		b[i] = a[i] + a[i + 1]
		if flag == 1:
			flag = -1
		else:
			flag = 1
	print(*b[:n])
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())
a = list(map(int, input().split()))
out = ''
for i in range(n - 1):
	out += str(a[i] + a[i + 1]) + ' '
out += str(a[-1])
print(out)


num = int(input())
a = list(map(int, input().split()))
b = []
for i in range(num):
	if i == num - 1:
		b.append(a[-1])
	else:
		b.append(a[i] + a[i + 1])
for i in b:
	print(i, end=' ')


count_input = int(input())
input_list = [int(i) for i in str.split(input())]
input_list.reverse()
out = []
for i in range(count_input):
	if i == 0:
		out.append(str(input_list[i]))
	else:
		out.append(str(input_list[i] + input_list[i - 1]))
out.reverse()
print(' '.join(out))


n = int(input())
A = list(map(int, input().split()))
B = []
for i in range(n - 1):
	B.append(A[i] + A[i + 1])
B.append(A[-1])
print(*B)


n = int(input())
ar = list(map(int, input().split())) + [0]
print(' '.join((str(ar[i] + ar[i + 1]) for i in range(n))))