import itertools n = int(input()) y = list(map(int, input().split())) s = list(itertools.accumulate(y)) b = [] total = s[n-1] # print('total:', total) for i in range(n): rest = y[i] * (n-1) b.append(total - rest) print(*b)