N = int(input()) Y = list(map(int, input().split())) S = sum(Y) ans = list(map(lambda x : S - (N - 1) * x, Y)) print(*ans)