N = int(input()) Y = list(map(int,input().split())) sy = 0 for i in Y: sy += i X = [] for i in range(len(Y)): X.append(sy-(N-1)*Y[i]) for i in range(N): X[i] = str(X[i]) print(' '.join(X))