import bisect N,A,B = map(int, input().split()) x = list(map(int, input().split())) par = [ i for i in range(N)] siz = [ 1 for i in range(N)] def root(x): if par[x] == x: return x else: par[x] = root(par[x]) return par[x] def same(x,y): return root(x) == root(y) def unite(x,y): x = root(x) y = root(y) if x == y: return if siz[x] < siz[y]: x,y = y,x par[x] = y siz[y] += siz[x] def size(x): return siz[root(x)] united = [False for i in range(N)] for i in range(N): if united[i]: continue ll = bisect.bisect_left(x,x[i]-B) lr = bisect.bisect_right(x,x[i]-A) rl = bisect.bisect_left(x,x[i]+A) rr = bisect.bisect_right(x,x[i]+B) for j in range(ll,lr): unite(i,j) united[i] = True united[j] = True for j in range(rl,rr): unite(i,j) united[i] = True united[j] = True for i in range(N): print(size(i))