#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int n;
char ch[N];
int a[N], tl[N], tr[N];
long long res[N];
void Init() {
  scanf("%d", &n);
  scanf("%s", ch + 1);
  for (int(i) = (1); (i) <= (n); (i)++) a[i] = a[i - 1] + (ch[i] == 'U');
}
void Work() {
  for (int(i) = (1); (i) <= (n); (i)++) {
    int L = a[i - 1], R = n - i - (a[n] - a[i]);
    if (ch[i] == 'D')
      if (L <= R)
        res[i] += i, tl[i] = L, tr[i] = L;
      else
        res[i] += n + 1 - i, tl[i] = R + 1, tr[i] = R;
    else if (R <= L)
      res[i] += n + 1 - i, tl[i] = R, tr[i] = R;
    else
      res[i] += i, tl[i] = L, tr[i] = L + 1;
  }
  vector<long long> s;
  s.push_back(0);
  for (int(i) = (1); (i) <= (n); (i)++) {
    res[i] +=
        2ll * ((long long)(i)*tl[i] - (s.back() - s[s.size() - 1 - tl[i]]));
    if (ch[i] == 'U') s.push_back(s.back() + i);
  }
  s.clear();
  s.push_back(0);
  for (int i = n; i >= 1; i--) {
    res[i] +=
        2ll * ((s.back() - s[s.size() - 1 - tr[i]]) - (long long)(i)*tr[i]);
    if (ch[i] == 'D') s.push_back(s.back() + i);
  }
}
void Out() {
  for (int(i) = (1); (i) <= (n); (i)++)
    printf("%I64d%c", res[i], i + 1 <= n ? ' ' : '\n');
}
int main() {
  Init();
  Work();
  Out();
  return 0;
}
