import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); int[] points = new int[n]; for (int i = 0; i < n; i++) { points[i] = sc.nextInt(); } int left = 0; int right = 0; UnionFindTree uft = new UnionFindTree(n); for (int i = 0; i < n; i++) { while (left < n && points[left] - points[i] < a) { left++; } if (left >= n) { break; } while (right < n && points[right] - points[i] <= b) { right++; } for (int j = left; j < right; j++) { uft.unite(i, j); } left = right - 1; } String result = IntStream.range(0, n) .mapToObj(i -> String.valueOf(uft.getCount(i))) .collect(Collectors.joining("\n")); System.out.println(result); } static class UnionFindTree { int[] parents; int[] counts; public UnionFindTree(int size) { parents = IntStream.range(0, size).toArray(); counts = new int[size]; Arrays.fill(counts, 1); } public int find(int x) { return x== parents[x] ? x : (parents[x] = find(parents[x])); } public void unite(int x, int y) { int xx = find(x); int yy = find(y); if (xx != yy) { parents[xx] = yy; counts[yy] += counts[xx]; } } public int getCount(int x) { return counts[find(x)]; } } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); StringBuilder sb = new StringBuilder(); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }