#include using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) #define rep2(i, x, n) for(int i = x; i <= n; i++) #define rep3(i, x, n) for(int i = x; i >= n; i--) #define elif else if #define sp(x) fixed << setprecision(x) #define pb push_back #define eb emplace_back #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() using ll = long long; using ld = long double; using pii = pair; using pil = pair; using pli = pair; using pll = pair; const ll MOD = 1e9+7; //const ll MOD = 998244353; const int inf = (1<<30)-1; const ll INF = (1LL<<60)-1; const ld EPS = 1e-10; template bool chmax(T &x, const T &y) {return (x < y)? (x = y, true) : false;}; template bool chmin(T &x, const T &y) {return (x > y)? (x = y, true) : false;}; struct Union_Find_Tree{ vector par, rank, num; Union_Find_Tree(int N){ par.assign(N, -1); rank.assign(N, 0); num.assign(N, 1); } int root(int x){ if(par[x] < 0 || par[x] == x) return x; return par[x] = root(par[x]); } bool unite(int x, int y){ x = root(x), y = root(y); if(x == y) return false; if(rank[x] < rank[y]) swap(x, y); if(rank[x] == rank[y]) rank[x]++; par[y] = x, num[x] += num[y]; return true; } int size(int x) {return num[root(x)];} bool same(int x, int y){ return root(x) == root(y); } void clear(){ fill(par.begin(), par.end(), -1); fill(rank.begin(), rank.end(), 0); fill(num.begin(), num.end(), 1); } }; int main(){ int N, A, B; cin >> N >> A >> B; int x[N]; rep(i, N) cin >> x[i]; int pos1 = 0, pos2 = 0; Union_Find_Tree uf(N); rep(i, N){ int nxt1 = pos1, nxt2 = pos2; while(nxt1 < N && x[nxt1]-x[i] < A) nxt1++; while(nxt2 < N && x[nxt2]-x[i] <= B) nxt2++; if(nxt1 == nxt2){ pos1 = nxt1, pos2 = nxt2; continue; } if(nxt1 < N) uf.unite(i, nxt1); if(nxt1 >= pos2){ rep2(i, nxt1, nxt2-2) uf.unite(i, i+1); } else{ rep2(i, pos2-1, nxt2-2) uf.unite(i, i+1); } pos1 = nxt1, pos2 = nxt2; } rep(i, N) cout << uf.size(i) << endl; }