N = int(input()) Y = list(map(int,input().split())) sumX = sum(Y) X = [] for y in Y: X.append(sumX-(N-1)*y) print(*X)