import sys input = sys.stdin.readline N,a,b=map(int,input().split()) X=list(map(int,input().split())) import bisect USEALL=set() ANS=[-1]*N for i in range(N): if i in USEALL: continue Q=[i] USE={i} while Q: x=Q.pop() s=bisect.bisect_left(X,X[x]+a) t=bisect.bisect_right(X,X[x]+b) for j in range(s,t): if j in USE: continue USE.add(j) Q.append(j) s=bisect.bisect_left(X,X[x]-b) t=bisect.bisect_right(X,X[x]-a) for j in range(s,t): if j in USE: continue USE.add(j) Q.append(j) L=len(USE) for t in USE: ANS[t]=L USEALL|=USE for a in ANS: print(a)