import math
N = int(input())
X = list(map(int, input().split()))
Y = []
for i in range(N - 1):
    Y.append(X[i + 1] - X[i])

Z = [1]
f = 1
for i in range(1, N):
    Z.append(Z[i - 1] * (i + 1) + math.factorial(i))

N_F = math.factorial(N - 1)
count = 0
for i in range(N - 1):
    print(Z[i] * N_F // math.factorial(i + 1))
    count += Z[i] * N_F // math.factorial(i + 1) * Y[i]
print(count % (10 ** 9 + 7))