import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 N=I() Y=LI() S=sum(Y) X=[0]*N for i in range(N): X[i]=S-Y[i]*(N-1) print(' '.join(map(str, X))) main()