#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1000100;
int lt[MAX_N], rt[MAX_N];
char s[MAX_N];
int m = 1, l = 1, r = 1, LC = 0, RC = 0;
long long L, R;
inline void mov() {
  if (s[m] == 'U')
    L += m, LC += 1;
  else
    R -= m, RC -= 1;
  ++m;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n >> &s[1];
  lt[0] = 0;
  for (int i = 1; i <= n; ++i) lt[i] = s[i] == 'U' ? i : lt[i - 1];
  rt[n + 1] = n + 1;
  for (int i = n; i >= 1; --i) rt[i] = s[i] == 'D' ? i : rt[i + 1];
  for (int i = 1; i <= n; ++i) {
    for (; r <= i; ++r)
      if (s[r] == 'D') R += r, RC += 1;
    while (m < i) mov();
    if (s[i] == 'U') mov();
    for (; r <= n && LC > RC; ++r)
      if (s[r] == 'D') R += r, RC += 1;
    for (; l < m && LC > RC; ++l)
      if (s[l] == 'U') L -= l, LC -= 1;
    if (i == m) {
      printf("%lld ",
             !LC ? i : ((rt[r] <= n ? rt[r] : 0) + rt[r] + 2 * R - i) - 2 * L);
    } else {
      if (!RC) {
        printf("%d ", n + 1 - i);
      } else if (lt[l - 1]) {
        printf("%lld ", 2 * R + (n + 1) - (2 * lt[l - 1] + 2 * L - i));
      } else {
        printf("%lld ", 2 * R - (2 * L - i));
      }
    }
  }
  printf("\n");
  return 0;
}
