#include using namespace std; int uf[200005]; int x[200005]; int find(int x) { if (uf[x] < 0) { return x; } return uf[x] = find(uf[x]); } bool merge(int x, int y) { x = find(x); y = find(y); if (x == y) { return false; } uf[x] += uf[y]; uf[y] = x; return true; } int main(void) { cin.tie(0); ios::sync_with_stdio(false); memset(uf, -1, sizeof(uf)); int N, A, B, t; cin >> N >> A >> B; for (int i = 1; i <= N; i++) { cin >> x[i]; } memset(uf, -1, sizeof(uf)); int L = 1; int R = 1; while (1) { if (L >= N && R >= N) { break; } //cout << L << ' ' << R << ' ' << x[R] - x[L] << '\n'; if (R >= N) { if (x[R] - x[L] >= A && x[R] - x[L] <= B) { merge(L, R); } L++; } else { if (x[R] - x[L] > B) { L++; } else { if (x[R] - x[L] >= A && x[R] - x[L] <= B) { //cout << L << ' ' << R << '\n'; merge(L, R); } R++; } } } L = N; R = N; while (1) { if (L <= 1 && R <= 1) { break; } //cout << L << ' ' << R << ' ' << x[R] - x[L] << '\n'; if (L<=1) { if (x[R] - x[L] >= A && x[R] - x[L] <= B) { merge(L, R); } R--; } else { if (x[R] - x[L] > B) { R--; } else { if (x[R] - x[L] >= A && x[R] - x[L] <= B) { //cout << L << ' ' << R << '\n'; merge(L, R); } L--; } } } for (int i = 1; i <= N; i++) { int R = find(i); cout << abs(uf[R]) << '\n'; } return 0; }