n = int(input())
y = list(map(int, input().split()))

s = sum(y)
x = []
for i in range(n):
    x.append(s - (n-1)*y[i])

print(*x)