N, X, Y = map(int, input().split()) A = list(map(int, input().split())) dpX = [0] * N dpX[0] = X - A[0] for i in range(1, N): dpX[i] = max(dpX[i - 1], 0) + X - A[i] maxX = [dpX[0]] * N for i in range(1, N): maxX[i] = max(maxX[i - 1], dpX[i]) A = A[::-1] dpY = [0] * N dpY[0] = Y - A[0] for i in range(1, N): dpY[i] = max(dpY[i - 1], 0) + Y - A[i] maxY = [dpY[0]] * N for i in range(1, N): maxY[i] = max(maxY[i - 1], dpY[i]) A = A[::-1] sumA = sum(A) maxY = maxY[::-1] for i in range(1, N - 1): print(sumA + maxX[i - 1] + maxY[i + 1])