N = int(input()) y = list(map(int, input().split())) S = sum(y) x = [0] * N for i in range(N): x[i] = S - y[i] * (N - 1) print(*x)