N = int(input()) Y = list(map(int, input().split())) S = sum(Y) print(*(S - y * (N - 1) for y in Y))