#include <bits/stdc++.h>
using namespace std;
long long u, a, second, b, kol1, kol2, ch, i, j, n, sum, q1, q2, m, k, r, kol,
    indexx, q, nach, kon, st, maxl, minl, x, wer_ery, sum1, sum2, ot, mn, pr,
    ln, sts, start, fin, tim, osttime;
char c;
long long pref[501000], suf[511111], t[511111];
map<long long, long long> mp;
int main() {
  cin >> n >> a >> b >> tim;
  for (i = 1; i <= n; i++) {
    cin >> c;
    if (c == 'w') {
      t[i] = 1 + b;
    } else
      t[i] = 1;
  }
  pref[1] = t[1];
  for (i = 2; i <= n; i++) {
    pref[i] = pref[i - 1] + a + t[i];
    cout << pref[i] << ' ';
  }
  cout << endl;
  for (i = n; i >= 1; i--) {
    suf[n - i + 1] = suf[n - i] + a + t[i];
  }
  cout << endl;
  sum = 0;
  for (i = 1; i <= n; i++) {
    sum = pref[i];
    if (sum <= tim) {
      osttime = tim - sum - (i - 1) * a;
      kol = upper_bound(suf + 1, suf + 1 + n, osttime) - suf;
      kol--;
      maxl = max(maxl, min(kol + i, n));
    }
    sum = suf[i];
    if (sum <= tim) {
      osttime = tim - sum - (i)*a - t[1];
      kol = upper_bound(pref + 1, pref + 1 + n, osttime) - pref;
      kol--;
      cout << sum << ' ' << osttime << ' ' << kol + i << " 2222" << endl;
      maxl = max(maxl, min(kol + i, n));
    }
  }
  cout << maxl;
}
