#include using namespace std; using LL=long long; using ULL=unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) struct dsu{ vector V; vector Z; void init(int n){ V.resize(n); Z.resize(n); rep(i,n) V[i]=i; rep(i,n) Z[i]=1; } int root(int a){ if(V[a]==a) return a; return V[a] = root(V[a]); } void unite(int a,int b){ a=root(a); b=root(b); if(a==b) return; V[a]=b; Z[b]+=Z[a]; } int size(int a){ return Z[root(a)]; } } G; int N; LL A,B; LL X[200001]; int to[200000]; int lower_bound_X(LL x){ int l,r; l=0; r=N+1; while(l+1>N>>A>>B; rep(i,N) cin>>X[i]; rep(i,N) to[i]=i; G.init(N); rep(i,N){ int l=lower_bound_X(X[i]+A); int r=lower_bound_X(X[i]+B+1); if(l==N) continue; if(l!=r){ to[l]=r-1; G.unite(i,l); } } rep(i,N-1) to[i+1]=max(to[i+1],to[i]); rep(i,N-1) if(to[i]!=i) G.unite(i,i+1); rep(i,N) cout<