#include using namespace std; template class UnionFind{ vector par_, weight_; public: UnionFind(size_t n){ par_.assign(n, -1); weight_.assign(n, 0); } int root(int x){ if (par_[x] < 0) { return x; }else{ int res = root(par_[x]); weight_[x] += weight_[par_[x]]; return par_[x] = res; } } int weight(int x){ root(x); return weight_[x]; } int weight(int x, int y){ return weight(y) - weight(x); } int size(int x){ return -par_[root(x)]; } bool IsSame(int x, int y){ return root(x) == root(y); } void Merge(int x, int y, Abel w){ w += weight(x); w -= weight(y); x = root(x); y = root(y); if (x == y) return; if (size(x) < size(y)) { w = -w; swap(x, y); } par_[x] += par_[y]; par_[y] = x; weight_[y] = w; } }; int main(){ int n, a, b; cin >> n >> a >> b; vector X(n); copy_n(istream_iterator(cin), n, X.begin()); int l = 0, r = 0; UnionFind uf(n); for (int i = 0; i < n; i++){ while (r < n and X[r] - X[i] <= b) r++; while (l < n and X[l] - X[i] < a) l++; for (int j = l; j < r; j++) uf.Merge(i, j, 0); } for (int i = 0; i < n; i++) cout << uf.size(i) << endl; }