#include <bits/stdc++.h>
using namespace std;
int N, ans, n, pref, suff;
char s[1100100];
bool p[1100100];
long long cl[1100100], cr[1100100];
vector<int> l, r;
vector<int>::iterator it;
long long qr(int i, int x) {
  if (!i) return 0;
  int si = (int)(upper_bound(l.begin(), l.end(), x) - l.begin());
  long long rem = (long long)i * x;
  return cr[si + i] - cr[si] - rem;
}
long long ql(int i, int x) {
  if (!i) return 0;
  int ei = (int)(lower_bound(r.begin(), r.end(), x) - r.begin());
  long long rem = (long long)i * (N - x - 1);
  return cl[ei] - cl[ei - i] - rem;
}
int main() {
  scanf("%d %s", &N, s);
  for (int i = 0; i < (N); i++) p[i] = (s[i] == 'U');
  for (int i = 0; i < (N); i++) {
    if (p[i])
      r.push_back(i);
    else
      l.push_back(i);
  }
  for (int i = 0; i < ((int)r.size()); i++) cl[i + 1] = cl[i] + (N - r[i] - 1);
  for (int i = 0; i < ((int)l.size()); i++) cr[i + 1] = cr[i] + l[i];
  for (int i = 0; i < (N); i++) {
    it = lower_bound(r.begin(), r.end(), i);
    pref = (int)(it - r.begin());
    it = upper_bound(l.begin(), l.end(), i);
    suff = (int)(l.end() - it);
    long long t = 0;
    if (p[i]) {
      if (pref < suff) {
        t = ql(pref, i) * 2 + qr(pref + 1, i) * 2 + i;
      } else {
        t = ql(suff, i) * 2 + qr(suff, i) * 2 + (N - i - 1);
      }
    } else {
      if (pref <= suff) {
        t = ql(pref, i) * 2 + qr(pref, i) * 2 + i;
      } else {
        t = ql(suff + 1, i) * 2 + qr(suff, i) * 2 + (N - i - 1);
      }
    }
    printf("%lld ", t + 1);
  }
  return 0;
}
