n, t, x, y = map(int, input().split()) y = min(x, y) d = sorted(map(int, input().split())) a = [] now = 0 last = d[0] for x in d: if x - last <= t: now += 1 else: a.append(now) now = 1 last = x a.append(now) a.sort() rest = a.pop() ans = [0] for _ in range(n): ans.append(ans[-1]) if rest == 0: rest += a.pop() ans[-1] += y rest -= 1 print(*ans[1:])