#include using namespace std; const int N = 2e5 + 10; using pii = pair; int n, a, b, x[N], ans[N]; int q[N], h, t; set s; void bfs(int st) { h = t = 0; q[t ++] = st; s.erase({x[st], st}); while(h < t) { int u = q[h ++]; int lt = t; for(auto it = s.lower_bound({x[u] - b, -1}); it != s.end() && it->first <= x[u] - a; it ++) q[t ++] = it->second; for(auto it = s.lower_bound({x[u] + a, -1}); it != s.end() && it->first <= x[u] + b; it ++) q[t ++] = it->second; while(lt < t) s.erase({x[q[lt]], q[lt ++]}); } for(int i = 0; i < t; i ++) ans[q[i]] = t; } int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> n >> a >> b; for(int i = 1; i <= n; i ++) { cin >> x[i]; s.insert({x[i], i}); } for(int i = 1; i <= n; i ++) { if(!ans[i]) bfs(i); cout << ans[i] << "\n"; } }