#include using namespace std; template inline bool chmax(T &a, T b) { if(a < b) { a = b; return 1; } return 0; } template inline bool chmin(T &a, T b) { if(a > b) { a = b; return 1; } return 0; } // #define DEBUG #ifdef DEBUG void debug() { cerr << "\n"; } template void debug(const T &x) { cerr << x << "\n"; } template void debug(const T &x, const Args &... args) { cerr << x << " "; debug(args...); } template void debugVector(const vector &v) { for(const T &x : v) { cerr << x << " "; } cerr << "\n"; } #else template void debug(const T &x, const Args &... args) {} template void debugVector(const vector &v) {} #endif using ll = long long; #define ALL(v) (v).begin(), (v).end() #define RALL(v) (v).rbegin(), (v).rend() const double EPS = 1e-7; const int INF = 1 << 30; const ll LLINF = 1LL << 60; constexpr int MOD = 1000000007; const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; //------------------------------------- struct UnionFind { vector par; UnionFind(int n) : par(n, -1) {} void init(int n) { par.assign(n, -1); } int root(int x) { if(par[x] < 0) return x; else return par[x] = root(par[x]); } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if(x == y) return false; if(par[x] > par[y]) swap(x, y); // merge technique par[x] += par[y]; par[y] = x; return true; } int size(int x) { return -par[root(x)]; } }; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, A, B; cin >> N >> A >> B; vector x(N); for(int i = 0; i < N; i++) { cin >> x[i]; } vector imos(N + 1, 0); UnionFind uf(N); for(int i = 0; i < N; i++) { int l = lower_bound(ALL(x), x[i] + A) - x.begin(); int r = upper_bound(ALL(x), x[i] + B) - x.begin(); debug(l, r); if(l >= r) { continue; } uf.merge(i, l); imos[l]++; imos[r - 1]--; } for(int i = 0; i < N; i++) { imos[i + 1] += imos[i]; } for(int i = 0; i < N - 1; i++) { if(imos[i] > 0) { uf.merge(i, i + 1); } } for(int i = 0; i < N; i++) { cout << uf.size(i) << "\n"; } }