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]) for j in range(N): P[j]=str(P[j]) print(' '.join(P))