# coding: utf-8 # Your code here! N=int(input()) Y=list(map(int,input().split())) Z=sum(Y) ans=[] for y in Y: ans.append(Z-y*(len(Y)-1)) print(*ans)