#include using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); int n, a, b; cin >> n >> a >> b; vector x(n); for (auto &i : x) cin >> i; vector id(n); iota(id.begin(), id.end(), 0); auto rep = [&] (auto&& self, int i) -> int { if (id[i] == i) return i; return id[i] = self(self, id[i]); }; auto unite = [&] (int i, int j) { i = rep(rep, i); j = rep(rep, j); if (i == j) return; id[i] = j; }; vector acc(n + 1); for (int i = 0; i < n; i++) { int l = lower_bound(x.begin(), x.end(), x[i] + a) - x.begin(); int r = upper_bound(x.begin(), x.end(), x[i] + b) - x.begin(); if (l != r) { acc[l + 1]++; acc[r]--; unite(i, l); unite(i, r - 1); } } int at = 0; for (int i = 0; i < n; i++) { at += acc[i]; if (at > 0) { unite(i - 1, i); } } vector cnt(n); for (int i = 0; i < n; i++) { cnt[rep(rep, i)]++; } for (int i = 0; i < n; i++) { cout << cnt[rep(rep, i)] << endl; } }