import sys readline = sys.stdin.readline readall = sys.stdin.read ns = lambda: readline().rstrip() ni = lambda: int(readline().rstrip()) nm = lambda: map(int, readline().split()) nl = lambda: list(map(int, readline().split())) prn = lambda x: print(*x, sep='\n') class UnionFind: def __init__(self, n): self.ps = [-1] * (n + 1) def find(self, x): if self.ps[x] < 0: return x else: self.ps[x] = self.find(self.ps[x]) return self.ps[x] def unite(self, x, y): x = self.find(x) y = self.find(y) if x == y: return False if self.ps[x] > self.ps[y]: x, y = y, x self.ps[x] += self.ps[y] self.ps[y] = x return True def same(self, x, y): return self.find(x) == self.find(y) def size(self, x): x = self.find(x) return -self.ps[x] def solve(): n, a, b = nm() l = nl() uf = UnionFind(n) cur = -1 lef, rig = 0, 0 for i in range(n): while lef < n and l[lef] - l[i] < a: lef += 1 while rig + 1 < n and l[rig + 1] - l[i] <= b: rig += 1 for j in range(max(cur, lef), rig): uf.unite(j, j+1) # print('a', j, j+1) cur = rig if lef <= rig: uf.unite(i, lef) # print('b', i, lef) uf.unite(i, rig) # print('b', i, rig) print(i, lef, rig) # cur = n # lef, rig = n-1, n-1 # for i in range(n-1, -1, -1): # while rig >= 0 and l[i] - l[rig] < a: # rig -= 1 # while lef > 0 and l[i] - l[lef-1] <= b: # lef -= 1 # for j in range(min(cur, rig), lef): # uf.unite(j, j-1) # cur = lef # if rig >= 0: # uf.unite(i, lef) # uf.unite(i, rig) # print(i, lef, rig) for i in range(n): print(uf.size(i)) return solve()