#include <bits/stdc++.h>
char s[1000010];
int n, cl, cr, pl[1000010], pr[1000010];
long long l[1000010], r[1000010], sl[1000010], sr[1000010], ans[1000010];
int main() {
  scanf("%d%s", &n, s + 1);
  for (int i = 1; i <= n; i++) {
    l[i] = l[i - 1], sl[i] = sl[i - 1];
    if (s[i] == 'U') {
      l[i]++, sl[i] += i;
      cl++, pl[cl] = i;
    }
  }
  for (int i = n; i >= 1; i--) {
    r[i] = r[i + 1], sr[i] = sr[i + 1];
    if (s[i] == 'D') {
      r[i]++, sr[i] += i;
      cr++, pr[cr] = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (s[i] == 'U') {
      if (l[i - 1] >= r[i + 1]) {
        ans[i] = (sr[i + 1] - r[i + 1] * i);
        ans[i] += r[i + 1] * i - (sl[i - 1] - sl[pl[l[i - 1] - r[i + 1]]]);
        ans[i] = (ans[i] << 1) + n + 1 - i;
      } else {
        ans[i] = (l[i - 1] * i - sl[i - 1]);
        ans[i] +=
            (sr[i + 1] - sr[pr[r[i + 1] - l[i - 1] - 1]]) - (l[i - 1] + 1) * i;
        ans[i] = (ans[i] << 1) + i;
      }
    } else {
      if (l[i - 1] > r[i + 1]) {
        ans[i] = (sr[i + 1] - r[i + 1] * i);
        ans[i] +=
            (r[i + 1] + 1) * i - (sl[i - 1] - sl[pl[l[i - 1] - r[i + 1] - 1]]);
        ans[i] = (ans[i] << 1) + n + 1 - i;
      } else {
        ans[i] = (l[i - 1] * i - sl[i - 1]);
        ans[i] += (sr[i + 1] - sr[pr[r[i + 1] - l[i - 1]]]) - l[i - 1] * i;
        ans[i] = (ans[i] << 1) + i;
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%I64d ", ans[i]);
  return 0;
}
