n = int(input())
y = list(map(int, input().split()))
su = sum(y)
seq = [su - yi * (n-1) for yi in y]
print(' '.join(map(str, seq)))