#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int inf = 0x3f;
const int MAXN = 1e6 + 5;
char ch[MAXN];
int u[MAXN], d[MAXN], n;
long long ans[MAXN];
queue<int> q;
int main() {
  scanf("%d%s", &n, ch + 1);
  for (int i = 1; i <= n; i++) u[i] = u[i - 1] + (ch[i] == 'U');
  for (int i = n; i >= 1; i--) d[i] = d[i + 1] + (ch[i] == 'D');
  for (int i = 1; i <= n; i++) {
    if (u[i] <= d[i + 1])
      ans[i] += i;
    else
      ans[i] += n - i + 1;
  }
  long long temp = 0;
  for (int i = 1; i <= n; i++) {
    temp += q.size();
    while (q.size() > d[i]) {
      temp -= (i - q.front());
      q.pop();
    }
    ans[i] += temp * 2;
    if (ch[i] == 'U') q.push(i);
  }
  while (!q.empty()) q.pop();
  temp = 0;
  for (int i = n; i >= 1; i--) {
    temp += q.size();
    while (q.size() > u[i]) {
      temp -= (q.front() - i);
      q.pop();
    }
    ans[i] += temp * 2;
    if (ch[i] == 'D') q.push(i);
  }
  for (int i = 1; i <= n; i++) {
    if (i == 1)
      cout << ans[i];
    else
      cout << " " << ans[i];
  }
  cout << endl;
}
