N = int(input())
Y = tuple(map(int, input().split()))
sum_Y = sum(Y)
ans = [sum_Y - y * (N - 1) for y in Y]
print(*ans)