N=int(input()) Y=list(map(int,input().split())) S=sum(Y)//(N-1) ANS=[0]*N for i in range(N): ANS[i]=S-Y[i]*(N-1) print(*ANS)