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