import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int n = Integer.parseInt(sa[0]); int a = Integer.parseInt(sa[1]); int b = Integer.parseInt(sa[2]); sa = br.readLine().split(" "); int[] x = new int[n]; for (int i = 0; i < n; i++) { x[i] = Integer.parseInt(sa[i]); } br.close(); UnionFind uf = new UnionFind(n); int l = 0; int r = 0; for (int i = 0; i < n; i++) { while (l < n && x[l] - x[i] < a) { l++; } r = l; while (r < n && x[r] - x[i] <= b) { uf.union(i, r); r++; } } PrintWriter pw = new PrintWriter(System.out); for (int i = 0; i < n; i++) { pw.println(uf.size(i)); } pw.flush(); } static class UnionFind { int[] parent, size; UnionFind(int n) { parent = new int[n]; size = new int[n]; for (int i = 0; i < n; i++) { parent[i] = i; size[i] = 1; } } void union(int x, int y) { int px = find(x); int py = find(y); if (px != py) { parent[px] = py; size[py] += size[px]; } } int find(int x) { if (parent[x] == x) { return x; } parent[x] = find(parent[x]); return parent[x]; } /** * xとyが同一連結成分か */ boolean same(int x, int y) { return find(x) == find(y); } /** * xを含む連結成分のサイズ */ int size(int x) { return size[find(x)]; } } }