#include <bits/stdc++.h>
using namespace std;
const int N = 1000100;
int n;
int pu[N], pd[N];
long long res[N], tmp;
char s[N];
char R() {
  char ch = getchar();
  while (ch != 'U' && ch != 'D') ch = getchar();
  return ch;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) s[i] = R();
  for (int i = 1; i <= n; i++)
    if (s[i] == 'D') pd[++pd[0]] = i;
  for (int i = n; i >= 1; i--)
    if (s[i] == 'U') pu[++pu[0]] = i;
  tmp = 0;
  for (int i = 1; i <= pd[0]; i++) {
    tmp += ((pd[i] - i) << 1);
    res[i] = i + tmp;
  }
  tmp = 0;
  for (int pos, i = 1; i <= pu[0]; i++) {
    pos = n - i + 1;
    tmp += ((pos - pu[i]) << 1);
    res[pos] = i + tmp;
  }
  for (int i = 1; i <= n; i++) printf("%I64d ", res[i]);
  return 0;
}
