n = int(input()) Y = list(map(int,input().split())) s = sum(Y) X = [s-(n-1)*y for y in Y] print(*X)