import collections class UnionFind(): def __init__(self): self.parents = dict() self.members_set = collections.defaultdict(lambda : set()) self.roots_set = set() self.key_ID = dict() self.ID_key = dict() self.cnt = 0 def dictf(self,x): if x in self.key_ID: return self.key_ID[x] else: self.cnt += 1 self.key_ID[x] = self.cnt self.parents[x] = self.cnt self.ID_key[self.cnt] = x self.members_set[x].add(x) self.roots_set.add(x) return self.key_ID[x] def find(self, x): ID_x = self.dictf(x) if self.parents[x] == ID_x: return x else: self.parents[x] = self.key_ID[self.find(self.ID_key[self.parents[x]])] return self.ID_key[self.parents[x]] def union(self, x, y): x = self.find(x) y = self.find(y) if self.parents[x] > self.parents[y]: x, y = y, x if x == y: return for i in self.members_set[y]: self.members_set[x].add(i) self.members_set[y] = set() self.roots_set.remove(y) self.parents[y] = self.key_ID[x] def size(self, x): return len(self.members_set[self.find(x)]) def same(self, x, y): return self.find(x) == self.find(y) def members(self, x): return self.members_set[self.find(x)] def roots(self): return self.roots_set def group_count(self): return len(self.roots_set) def all_group_members(self): return {r: self.members_set[r] for r in self.roots_set} import bisect N,A,B = map(int,input().split()) x = list(map(int,input().split())) uf_s = UnionFind() for i in range(N-1): left=bisect.bisect_left(x,x[i]+A) right=bisect.bisect_right(x,x[i]+B) for j in range(left,right): uf_s.union(x[i], x[j]) for n in x: print(len(uf_s.members(n)))