n = int(input()) yn = list(map(int, input().split(' '))) s = 0 for i in range(n): s += yn[i] for i in range(n): print(s - yn[i] * (n - 1), '', end='') print()