from bisect import bisect_left, bisect_right class UnionFind(): def __init__(self, n): self.n = n self.parents = [-1] * n def root(self, x): if self.parents[x] < 0: return x else: self.parents[x] = self.root(self.parents[x]) return self.parents[x] def unite(self, x, y): x = self.root(x) y = self.root(y) if x == y: return if self.parents[x] > self.parents[y]: x, y = y, x self.parents[x] += self.parents[y] self.parents[y] = x def size(self, x): return -self.parents[self.root(x)] def issame(self, x, y): return self.root(x) == self.root(y) N,A,B = list(map(int,input().split())) X = list(map(int,input().split())) uf = UnionFind(N) for i in range(N): l = bisect_left(X, X[i]-B) r = bisect_right(X, X[i]-A) for j in range(l, r): if uf.issame(i, j): break uf.unite(i, j) for j in range(r-1, l-1, -1): if uf.issame(i, j): break uf.unite(i, j) for i in range(N): print(uf.size(i))