N = int(input())
Y = [int(y) for y in input().split()]

s = sum(Y)
X = [0]*N
for i in range(N):
    X[i] = str(s-Y[i]*(N-1))

print(" ".join(X))