import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); int[] arr = new int[n + 1]; for (int i = 0; i < n; i++) { arr[i] = sc.nextInt(); } arr[n] = Integer.MAX_VALUE; int left = 0; int right = 0; UnionFindTree uft = new UnionFindTree(n); for (int i = 0; i < n; i++) { while (arr[left] - arr[i] < a) { left++; } if (left == n) { break; } while(arr[right] - arr[i] <= b) { right++; } for (int j = left; j < right; j++) { uft.unite(i, j); } } StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { sb.append(uft.getCount(i)).append("\n"); } System.out.print(sb); } static class UnionFindTree { int[] parents; int[] counts; public UnionFindTree(int size) { parents = new int[size]; counts = new int[size]; for (int i = 0; i < size; i++) { parents[i] = i; counts[i] = 1; } } public int find(int x) { if (x == parents[x]) { return x; } else { return parents[x] = find(parents[x]); } } public boolean same(int x, int y) { return find(x) == find(y); } public void unite(int x, int y) { if (!same(x, y)) { int xx =find(x); int yy = find(y); parents[xx] = yy; counts[yy] += counts[xx]; } } public int getCount(int x) { return counts[find(x)]; } } }