#include <bits/stdc++.h>
using namespace std;
const int SIZEN = 1000010;
int N;
char S[SIZEN];
int downP[SIZEN], upP[SIZEN];
long long F[SIZEN];
long long ans[SIZEN];
class BIT {
 public:
  int n;
  long long s[SIZEN];
  long long rs[SIZEN];
  void clear(int _n) {
    n = _n;
    memset(s, 0, sizeof(s));
    memset(rs, 0, sizeof(rs));
  }
  void addpre(int x, int t) {
    if (x <= 0) return;
    for (int i = x; i; i -= ((i) & (-i))) s[i] += t;
    for (int i = x; i <= n; i += ((i) & (-i))) rs[i] += x * t;
  }
  long long presum(int x) {
    if (x <= 0) return 0;
    long long b = 0, c = 0;
    for (int i = x; i <= n; i += ((i) & (-i))) b += s[i];
    for (int i = x - 1; i; i -= ((i) & (-i))) c += rs[i];
    return b * x + c;
  }
  void change(int l, int r, long long t) {
    addpre(r, t);
    addpre(l - 1, -t);
  }
  long long query(int l, int r) {
    if (l > r) return 0;
    return presum(r) - presum(l - 1);
  }
} T;
void work(void) {
  int totU = 0, totD = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == 'U')
      totU++;
    else
      totD++;
  }
  int nowU = 0, nowD = 0;
  for (int i = 0; i < N; i++) {
    if (nowU >= totD - nowD) {
      upP[i] = totD - nowD;
      downP[i] = upP[i];
      ans[i] = N - i;
    } else {
      downP[i] = nowU;
      upP[i] = downP[i] + 1;
      ans[i] = i + 1;
    }
    if (S[i] == 'U')
      nowU++;
    else
      nowD++;
  }
  T.clear(N);
  int n = 0;
  for (int i = 0; i < N; i++) {
    ans[i] += T.query(n - downP[i] + 1, n);
    if (S[i] == 'U') {
      n++;
    }
    T.change(1, n, 2);
  }
  T.clear(N);
  n = 0;
  for (int i = N - 1; i >= 0; i--) {
    T.change(1, n, 2);
    if (S[i] == 'D') {
      n++;
    }
    ans[i] += T.query(n - upP[i] + 1, n);
  }
  for (int i = 0; i < N; i++) printf("%I64d ", ans[i]);
}
void read(void) {
  scanf("%d", &N);
  scanf("%s", S);
}
int main() {
  read();
  work();
  return 0;
}
