class UnionFind: def __init__(self, n): self._n = n self._parent = [-1] * n self._roots = set(range(n)) def _find(self, x): if self._parent[x] < 0: return x self._parent[x] = self._find(self._parent[x]) return self._parent[x] def union(self, x, y): x, y = self._find(x), self._find(y) if x == y: return if self._parent[y] < self._parent[x]: x, y = y, x self._parent[x] += self._parent[y] self._parent[y] = x self._roots.discard(y) def same(self, x, y): return self._find(x) == self._find(y) def size(self, x): return -self._parent[self._find(x)] def members(self, x): root = self._find(x) return [i for i in range(self._n) if self._find(i) == root] def all_group_members(self): group_members = dict() for member in range(self._n): root = self._find(member) if root not in group_members: group_members[root] = [] group_members[root].append(member) return group_members def root(self, x): return self._find(x) def roots(self): return self._roots def group_count(self): return len(self.roots()) def group_numbers(self): return [self._find(i) for i in range(self._n)] def __str__(self): return '\n'.join(f'{r}: {m}' for r, m in self.all_group_members().items()) N, A, B = map(int, input().split()) X = list(map(int, input().split())) idx = {x: i for i, x in enumerate(X)} S = set(X) uf = UnionFind(N) rm = [] while S: sx = S.pop() stack = [sx] while stack: x = stack.pop() for nx in S: if A <= abs(x - nx) <= B: uf.union(idx[x], idx[nx]) rm.append(nx) stack.append(nx) while rm: S.discard(rm.pop()) for i in range(N): print(uf.size(i))