#include <bits/stdc++.h>
using namespace std;
int n, lu[1111111], rd[1111111], s, e, a[1111111];
long long ans[1111111];
char c[1111111];
int main() {
  while (~scanf("%d", &n)) {
    scanf("%s", c + 1);
    lu[0] = 0;
    for (int i = 1; i <= n; i++) lu[i] = lu[i - 1] + (c[i] == 'U');
    rd[n + 1] = 0;
    for (int i = n; i >= 1; i--) rd[i] = rd[i + 1] + (c[i] == 'D');
    for (int i = 1; i <= n; i++) {
      if (lu[i] <= rd[i + 1])
        ans[i] = i;
      else
        ans[i] = n - i + 1;
    }
    s = e = 0;
    long long temp = 0;
    for (int i = 1; i <= n; i++) {
      temp += e - s;
      while (e - s > rd[i]) temp -= i - a[s++];
      ans[i] += 2ll * temp;
      if (c[i] == 'U') a[e++] = i;
    }
    s = e = 0;
    temp = 0;
    for (int i = n; i >= 1; i--) {
      temp += e - s;
      while (e - s > lu[i]) temp -= a[s++] - i;
      ans[i] += 2ll * temp;
      if (c[i] == 'D') a[e++] = i;
    }
    for (int i = 1; i <= n; i++) printf("%I64d%c", ans[i], i == n ? '\n' : ' ');
  }
  return 0;
}
