// 20:39 - 20:49 #include using namespace std; #define fi first #define se second #define all(x) x.begin(), x.end() #define lch (o << 1) #define rch (o << 1 | 1) typedef double db; typedef long long ll; typedef unsigned int ui; typedef pair pint; typedef tuple tint; const int N = 2e5 + 5; const int INF = 0x3f3f3f3f; const ll INF_LL = 0x3f3f3f3f3f3f3f3f; int pa[N], siz[N]; int Find(int x) { return x == pa[x] ? x : pa[x] = Find(pa[x]); } ll x[N]; int main() { ios::sync_with_stdio(0); int n; ll a, b; cin >> n >> a >> b; for (int i = 1; i <= n; i++) { cin >> x[i]; pa[i] = i; siz[i] = 1; } int p = 1; // [l, r] for (int i = 1; i <= n; i++) { int l = lower_bound(x + 1, x + n + 1, x[i] + a) - x; p = max(l, p); while (p <= n && x[p] <= x[i] + b) { int pa1 = Find(i); int pa2 = Find(p); if (pa1 != pa2) { siz[pa1] += siz[pa2]; pa[pa2] = pa[pa1]; } p++; } } for (int i = 1; i <= n; i++) x[i] = ll(1e9) - x[i]; reverse(x + 1, x + n + 1); p = 1; for (int i = 1; i <= n; i++) { int l = lower_bound(x + 1, x + n + 1, x[i] + a) - x; p = max(l, p); while (p <= n && x[p] <= x[i] + b) { int pa1 = Find(n - i + 1); int pa2 = Find(n - p + 1); if (pa1 != pa2) { siz[pa1] += siz[pa2]; pa[pa2] = pa[pa1]; } p++; } } for (int i = 1; i <= n; i++) cout << siz[Find(i)] << endl; return 0; }