import bisect from collections import deque N,A,B=map(int,input().split()) x=list(map(int,input().split())) x.sort() ne=[-1]*N def root(N): if ne[N]<0: return N else: ne[N]=root(ne[N]) return ne[N] def merge(x,y): x,y=root(x),root(y) if ne[x]>ne[y]: x,y=y,x ne[x]+=ne[y] ne[y]=x def same(x,y): return root(x)==root(y) q=deque() stp=set() for i in range(N): if i in stp: continue eru=bisect.bisect_left(x,x[i]+A) aru=bisect.bisect_right(x,x[i]+B) for v in range(eru,aru): if same(i,v) or v in stp: continue stp.add(v) merge(i,v) q.append(v) while q: n=q.popleft() eru=bisect.bisect_left(x,x[n]+A) aru=bisect.bisect_right(x,x[n]+B) for v in range(eru,aru): if same(n,v) or v in stp: continue stp.add(v) merge(n,v) q.append(v) for i in range(N): print(-ne[root(i)])