# x, y = map(int, input().split())
# data = []
# for i in range(51):
# tmp = []
# for j in range(51):
#
# tmp.append(1)
# data.append(tmp)
# print(data)
# print("\n")
# for i in range(1, 51):
# for j in range(1, 51):
# if i == 1 or j == 1:
# data[i][j] = 1
# else:
# data[i][j] = data[i-1][j] + data[i][j+1]
#map(int/float, 변수) 앞의 float/int을 뒤의 input에 적용시킨다
# 1 1 1 1 1....
# 1 2 3 4......
# 1 3 6........
# 1 4.......... 자신의 위치의 대각선(x+1,y+1)의 수와 자신을 더하면 x+1의 값이 나온다
#
#_______________________________
# x = int(input())
# sum = 1
# data = []
# for i in range(x):
# tmp = []
# for j in range(1,x+1):
#
# tmp.append(sum)
# sum = sum + 1
#
# data.append(tmp)
# for i in range(x):
# for j in range(x):
# print(data[i][j],end=" ")
# print()
# def test(a, b):
# return a+b
# print(test(2,3))
#____________________________________
# x = int(input())
# sum = 1
# data = []
# for i in range(x):
# tmp = []
# for j in range(x):
# tmp.append(0)
# data.append(tmp)
#
# for i in range(0,x):
# for j in range(0,x):
# data[j][i] = sum
# sum = sum + 1
#
# for i in range(x):
# for j in range(x):
# print(data[i][j],end=" ")
# print()
# for i in range(x):
# for j in range(x):
# data[i][j] = sum
# sum = sum + x
# sum = 2 + i
# x
# y z
#
# x = y - z
# y = x + z
# z = y - x
x = int(input())
data = []
for i in range(x):
tmp = []
tmp.append(int(input()))
data.append(tmp)
for i in range(x):
for j in range(1,i+1):
data[i].append(data[i][j-1]-data[i-1][j-1])
for i in range(x):
for j in range(1,i+1):
print(data[i][j],end=" ")
print()