#include <bits/stdc++.h>
const int N = 1000000 + 5;
int n;
char s[N];
int leftu[N], s_leftu;
long long sum_leftu[N];
int rightd[N], s_rightd;
long long sum_rightd[N];
int main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (int i = n; i >= 1; --i)
    if (s[i] == 'D') rightd[++s_rightd] = i;
  for (int i = 1; i <= s_rightd; ++i)
    sum_rightd[i] = sum_rightd[i - 1] + rightd[i];
  for (int i = 1; i <= n; ++i) {
    if (s_leftu < s_rightd) {
      long long ans = 0;
      ans += i;
      ans += s_leftu * 2LL * i - sum_leftu[s_leftu] * 2LL;
      ans += (sum_rightd[s_rightd] - sum_rightd[s_rightd - s_leftu - 1] -
              (s_leftu + 1LL) * i) *
             2LL;
      printf("%I64d ", ans);
    } else {
      long long ans = 0;
      ans += n - i + 1;
      ans += sum_rightd[s_rightd] * 2LL - s_rightd * 2LL * i;
      ans += (s_rightd * 1LL * i - sum_leftu[s_leftu] +
              sum_leftu[s_leftu - s_rightd]) *
             2LL;
      printf("%I64d ", ans);
    }
    if (s[i] == 'U') {
      leftu[++s_leftu] = i;
      sum_leftu[s_leftu] = sum_leftu[s_leftu - 1] + i;
    } else {
      --s_rightd;
    }
  }
  putchar('\n');
  return 0;
}
