n = int(input()) coordinate = [ int(v) for v in input().split() ][::-1] for i in range(n-2): coordinate[i+2] += coordinate[i] coordinate[i] = 0 zero = 0 for i in range(n): if coordinate[i] == 0: zero += 1 coordinate = [ str(i) for i in coordinate ] print(" ".join(coordinate[zero:][::-1]))