#include <bits/stdc++.h>
using namespace std;
char ch[1000005];
int cnt[1000005];
long long res[1000005], sum;
int main() {
  int n;
  cin >> n;
  getchar();
  for (int i = 1; i <= n; i++) ch[i] = getchar();
  cnt[0] = 0;
  sum = 0;
  for (int i = 1; i <= n; i++)
    if (ch[i] == 'D') {
      cnt[0]++;
      cnt[cnt[0]] = i;
    }
  for (int i = 1; i <= cnt[0]; i++) {
    sum += (cnt[i] - i) * 2;
    res[i] = sum + i;
  }
  cnt[0] = 0;
  sum = 0;
  for (int i = n; i >= 1; i--)
    if (ch[i] == 'U') cnt[++cnt[0]] = i;
  for (int i = 1; i <= cnt[0]; i++) {
    int now = n - i + 1;
    sum += (now - cnt[i]) * 2;
    res[now] = sum + i;
  }
  for (int i = 1; i <= n; i++) cout << res[i] << " ";
  return 0;
}
