import math
N = int(input())
L = [int(x) for x in input().split()]
Res = 0
prod = 0
for i in range(0,N-1):    
    for k in range(0,i+1):
        prod += 1/(k+1)
    print(prod)
    Res += (L[i+1]-L[i])*prod
    prod = 0
print ((Res*math.factorial(N-1))%(10**9+7))