class UnionFind: par = [] def __init__(self, n): self.par = [i for i in range(n)] def find(self, n): if self.par[n] == n: return n p = self.find(self.par[n]) self.par[n] = p return p def merge(self, m, n): m = self.find(m) n = self.find(n) self.par[m] = n n, a, b = map(int, input().split()) x = list(map(int, input().split())) v = [0] * (n + 1) l = 0 r = 0 t = UnionFind(n) for i in range(n): while l < n and x[l] < x[i] + a: l += 1 while r < n and x[r] <= x[i] + b: r += 1 if l == r: continue v[l] += 1 v[r - 1] -= 1 t.merge(i, l) for i in range(n): v[i + 1] += v[i] if v[i] > 0: t.merge(i, i + 1) y = [0] * n s = [0] * n for i in range(n): y[i] = t.find(i) s[y[i]] += 1 for i in range(n): print(s[y[i]])