n = int(input()) y = list(map(int, input().split())) s = sum(y) for i in range(n): print(s - y[i] * (n - 1), end=" ")