import bisect import collections def main(): N,A,B = map(int,input().split()) lsx = list(map(int,input().split())) used = [-1]*(N) ap = [False]*(N) for i in range(N): if used[i] != -1: continue d = collections.deque([i]) while d: now = d.popleft() if used[now] != -1: continue used[now] = i indl = bisect.bisect_left(lsx, lsx[now]-B) indr = bisect.bisect_right(lsx, lsx[now]-A) for nex in range(indl,indr): if used[nex] != -1 or ap[nex]: continue ap[nex] = True d.append(nex) indl = bisect.bisect_left(lsx, lsx[now]+A) indr = bisect.bisect_right(lsx, lsx[now]+B) for nex in range(indl,indr): if used[nex] != -1 or ap[nex]: continue ap[nex] = True d.append(nex) cnt = collections.Counter(used) for i in range(N): print(cnt[used[i]]) main()