from math import comb
n = int(input()) + 1
f = list(map(int, input().split()))[::-1]
for i in range(n):
    x = f[i]
    f[i] = 0
    for di in range(i + 1):
        v = comb(i, di) * x
        if di % 2:
            f[i-di] -= v
        else:
            f[i-di] += v
print(*f[::-1])