#include <bits/stdc++.h>
const int maxn = 1000005;
using namespace std;
int n;
char s[maxn];
int a[maxn];
long long ans[maxn];
int main() {
  cin >> n;
  getchar();
  for (int i = 1; i <= n; i++) scanf("%c", s + i);
  int num = 0;
  for (int i = 1; i <= n; i++)
    if (s[i] == 'D') a[++num] = i;
  long long tot = 0;
  for (int i = 1; i <= num; i++) {
    tot += (a[i] - i) * 2;
    ans[i] = i + tot;
  }
  num = 0;
  for (int i = n; i >= 1; i--)
    if (s[i] == 'U') a[++num] = i;
  tot = 0;
  for (int i = 1; i <= num; i++) {
    int w = n - i + 1;
    tot += (w - a[i]) * 2;
    ans[w] = i + tot;
  }
  for (int i = 1; i <= n; i++) printf("%I64d ", ans[i]);
  printf("\n");
  return 0;
}
