N=int(input()) Y=list(map(int,input().split())) A=sum(Y)//(N-1) P=list() for i in range(N): P.append(A-Y[i]) print(' '.join(P))