Untitled
# ещё раз n = int(input()) s = list(map(int, input().split())) a = [s[-1]] * n for p in range(n-1, 0, -1): an = s[p-1] - a[0] x = 2*p+1 while x < n+1: an -= a[x-1] x += p a[p] = an print(*a)
# ещё раз n = int(input()) s = list(map(int, input().split())) a = [s[-1]] * n for p in range(n-1, 0, -1): an = s[p-1] - a[0] x = 2*p+1 while x < n+1: an -= a[x-1] x += p a[p] = an print(*a)