from bisect import bisect, bisect_left import sys def input(): return sys.stdin.readline()[:-1] class UnionFind(): def __init__(self, size): self.table = [-1 for _ in range(size)] self.size = [1 for _ in range(size)] def find(self, x): while self.table[x] >= 0: if self.table[self.table[x]] >= 0: self.table[x] = self.table[self.table[x]] x = self.table[x] return x def unite(self, x, y): s1 = self.find(x) s2 = self.find(y) if s1 == s2: return False else: if self.table[s1] > self.table[s2]: self.table[s2] = s1 self.table[s1] -= 1 self.size[s1] += self.size[s2] self.size[s2] = 0 else: self.table[s1] = s2 self.table[s2] -= 1 self.size[s2] += self.size[s1] self.size[s1] = 0 return True def get_size(self, x): return self.size[self.find(x)] n, a, b = map(int, input().split()) x = list(map(int, input().split())) uf = UnionFind(n) for i in range(n): l = bisect_left(x, x[i]+a) r = bisect(x, x[i]+b) #print(l, r) if l == r: continue if l == n: break uf.unite(i, l) j = l while j < r-1 and uf.unite(j, j+1): j += 1 print(*[uf.get_size(i) for i in range(n)], sep="\n")