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