#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define ALL(v) (v).begin(), (v).end() using ll = long long; constexpr int INF = 1e9; constexpr long long LINF = 1e18; constexpr long long MOD = 1e9 + 7; struct UnionFind { vector par, siz; UnionFind(int n) : par(n), siz(n, 1) { iota(par.begin(), par.end(), 0); } int root(int x) { if (par[x] == x) return x; else return par[x] = root(par[x]); } void unite(int x, int y) { x = root(x); y = root(y); if (x == y) return; if (siz[x] < siz[y]) swap(x, y); siz[x] += siz[y]; par[y] = x; } bool same(int x, int y) { return root(x) == root(y); } int size(int x) { return siz[root(x)]; } }; signed main() { int n; ll a, b; cin >> n >> a >> b; ll x[n]; rep(i, n) { cin >> x[i]; } UnionFind uf(n); int imos[n + 1] = {}; rep(i, n) { int l = lower_bound(x, x + n, x[i] + a) - x; int r = upper_bound(x, x + n, x[i] + b) - x - 1; if (r < l) continue; uf.unite(i, l); imos[l]++; imos[r]--; } rep(i, n - 1) { imos[i + 1] += imos[i]; } rep(i, n - 1) { if (imos[i] > 0) uf.unite(i, i + 1); } rep(i, n) { cout << uf.size(i) << endl; } return 0; }