n,t,x,y = map(int,input().split()) d = list(map(int,input().split())) d.sort() a = [] z = 0 for i in range(n-1): z += 1 if d[i+1] - d[i] > t: a.append(z) z = 0 else: continue z += 1 a.append(z) a.sort() ans = [0 for i in range(n)] i = 0 temp = 0 while a: z = a.pop() for j in range(z): ans[i] = temp i += 1 temp += min(x,y) print(*ans)