n=int(input()) y=[*map(int,input().split())] s=sum(y) x=[] for i in y: x.append(s-(n-1)*i) print(*x,sep=' ')