#include <bits/stdc++.h>
using namespace std;
char s[1000000];
int n, size_u = 0, size_d = 0;
long long cnt_u[1000000], cnt_d[1000000], pre_u[1000000], suf_d[1000000];
void solve(int p) {
  long long ans =
      ((cnt_u[p] > cnt_d[p] || cnt_u[p] == cnt_d[p] && s[p] == 'D') ? n - p
                                                                    : p + 1);
  if (p > 0 && p < n - 1) {
    int N = min(cnt_u[p - 1], cnt_d[p + 1]);
    ans += 2 * (N * p - pre_u[cnt_u[p - 1]] + pre_u[cnt_u[p - 1] - N]);
    ans += 2 * (suf_d[cnt_d[p + 1]] - suf_d[cnt_d[p + 1] - N] - N * p);
    if (s[p] == 'U' && cnt_d[p] > 0 && cnt_d[p + 1] > cnt_u[p - 1])
      ans += 2 * (suf_d[cnt_d[p + 1] - N] - suf_d[cnt_d[p + 1] - N - 1] - p);
    if (s[p] == 'D' && cnt_u[p] > 0 && cnt_d[p + 1] < cnt_u[p - 1])
      ans += 2 * (p - pre_u[cnt_u[p - 1] - N] + pre_u[cnt_u[p - 1] - N - 1]);
  }
  if (p == 0 && s[p] == 'U' && cnt_d[p] > 0)
    ans += 2 * (suf_d[cnt_d[p + 1]] - suf_d[cnt_d[p + 1] - 1] - p);
  if (p == n - 1 && s[p] == 'D' && cnt_u[p] > 0)
    ans += 2 * (p - pre_u[cnt_u[p - 1]] + pre_u[cnt_u[p - 1] - 1]);
  printf("%lld ", ans);
}
int main() {
  scanf("%d%s", &n, s);
  pre_u[0] = suf_d[0] = 0;
  for (int i = 0; i < n; ++i) {
    if (i == 0)
      cnt_u[0] = (s[0] == 'U') ? 1 : 0;
    else
      cnt_u[i] = (s[i] == 'U') ? cnt_u[i - 1] + 1 : cnt_u[i - 1];
    if (s[i] == 'U') {
      ++size_u;
      pre_u[size_u] = pre_u[size_u - 1] + i;
    }
  }
  for (int i = n - 1; i >= 0; --i) {
    if (i == n - 1)
      cnt_d[n - 1] = (s[n - 1] == 'D') ? 1 : 0;
    else
      cnt_d[i] = (s[i] == 'D') ? cnt_d[i + 1] + 1 : cnt_d[i + 1];
    if (s[i] == 'D') {
      ++size_d;
      suf_d[size_d] = (size_d > 0) ? suf_d[size_d - 1] + i : i;
    }
  }
  for (int i = 0; i < n; ++i) solve(i);
  return 0;
}
