#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7f7f7f7f;
const int MAXN = 1e6 + 111;
char s[MAXN];
long long ans[MAXN];
int pos[MAXN], len;
int main() {
  int n;
  scanf("%d%s", &n, s + 1);
  len = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == 'D') pos[++len] = i;
  }
  long long tol = 0;
  for (int i = 1; i <= len; ++i) {
    tol += (pos[i] - i) << 1;
    ans[i] = i + tol;
  }
  len = 0;
  for (int i = n; i > 0; --i) {
    if (s[i] == 'U') pos[++len] = i;
  }
  tol = 0;
  for (int i = 1; i <= len; ++i) {
    int cur = n - i + 1;
    tol += (cur - pos[i]) << 1;
    ans[cur] = i + tol;
  }
  for (int i = 1; i <= n; ++i) printf("%lld ", ans[i]);
  return 0;
}
