n, a, b = map(int, input().split()) X = list(map(int, input().split())) def Find(x, par): if par[x] < 0: return x else: par[x] = Find(par[x], par) return par[x] def Unite(x, y, par, rank): x = Find(x, par) y = Find(y, par) if x != y: if rank[x] < rank[y]: par[y] += par[x] par[x] = y else: par[x] += par[y] par[y] = x if rank[x] == rank[y]: rank[x] += 1 def Same(x, y, par): return Find(x, par) == Find(y, par) def Size(x, par): return -par[Find(x, par)] par = [-1]* n rank = [0]*n import bisect for i in range(n): x = X[i] l = bisect.bisect_left(X, x+a) r = bisect.bisect_right(X, x+b) for k in range(l, r): if Same(i, k, par): break Unite(i, k, par, rank) ans = [0]*n for i in range(n): ans[i] = Size(i, par) print(*ans, sep='\n')