import sys input = sys.stdin.readline import bisect N,a,b=map(int,input().split()) X=list(map(int,input().split())) # UnionFind Group = [i for i in range(N+1)] # グループ分け Nodes = [1]*(N+1) # 各グループのノードの数 def find(x): while Group[x] != x: x=Group[x] return x def Union(x,y): if find(x) != find(y): if Nodes[find(x)] < Nodes[find(y)]: Nodes[find(y)] += Nodes[find(x)] Nodes[find(x)] = 0 Group[find(x)] = find(y) else: Nodes[find(x)] += Nodes[find(y)] Nodes[find(y)] = 0 Group[find(y)] = find(x) for i in range(N): s=bisect.bisect_left(X,X[i]+a) t=bisect.bisect_right(X,X[i]+b) for j in range(s,t): Union(i,j) ALIST=[[] for i in range(N)] for i in range(N): ALIST[find(i)].append(i) ANS=[-1]*N for i in range(N): for a in ALIST[i]: ANS[a]=len(ALIST[i]) for a in ANS: print(a)