#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5, oo = 0x3f3f3f3f;
char s[maxn];
long long dd[maxn], du[maxn];
vector<int> u, d;
int main(void) {
  int n;
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'D')
      d.push_back(i);
    else
      u.push_back(n - i - 1);
  }
  int sz = d.size();
  for (int i = 0; i < sz; ++i) {
    dd[i] = dd[i - 1] + d[i];
  }
  sz = u.size();
  du[sz] = 0;
  for (int i = sz - 1; i >= 0; --i) {
    du[i] = du[i + 1] + u[i];
  }
  long long ans = 0;
  int pu = 0, pd = -1;
  int cu = 0, cd = d.size();
  for (int i = 0; i < n; ++i) {
    ans = 0;
    if (s[i] == 'D') {
      pd++;
      if (cd <= cu) {
        ans = (du[pu - cd] - du[pu] - cd * 1ll * (n - 1 - i) + dd[pd + cd - 1] -
               dd[pd - 1] - cd * 1ll * i) *
              2ll;
        ans += n - i;
      } else {
        ans = (du[pu - cu] - du[pu] - cu * 1ll * (n - 1 - i) + dd[pd + cu] -
               dd[pd - 1] - (cu + 1) * 1ll * i) *
              2ll;
        ans += i + 1;
      }
      cd--;
    } else {
      if (cd <= cu) {
        ans = (du[pu - cd] - du[pu] - cd * 1ll * (n - 1 - i) + dd[pd + cd] -
               dd[pd] - cd * 1ll * i) *
              2ll;
        ans += n - i;
      } else if (cd > cu) {
        ans = (du[pu - cu] - du[pu] - cu * 1ll * (n - 1 - i) + dd[pd + cu + 1] -
               dd[pd] - (cu + 1) * 1ll * i) *
              2ll;
        ans += i + 1;
      }
      cu++;
      pu++;
    }
    printf("%I64d ", ans);
  }
  return 0;
}
