#include <bits/stdc++.h>
using namespace std;
int n;
char s[1000005];
long long l[1000005], r[1000005], ls[1000005], rs[1000005], up[1000005],
    dn[1000005], cnt, res;
int main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (int i = 2; i <= n; i++) {
    ls[i] = ls[i - 1];
    l[i] = l[i - 1];
    if (s[i - 1] == 'U') {
      up[++cnt] = i - 1;
      ls[i]++;
    }
    l[i] += ls[i];
  }
  if (s[n] == 'U') up[++cnt] = n;
  for (int i = n - 1; i >= 1; i--) {
    rs[i] = rs[i + 1];
    r[i] = r[i + 1];
    if (s[i + 1] == 'D') {
      dn[++res] = i + 1;
      rs[i]++;
    }
    r[i] += rs[i];
  }
  if (s[1] == 'D') dn[++res] = 1;
  for (int i = 1; i <= n; i++) {
    long long ans = 1;
    if (s[i] == 'U') {
      if (ls[i] + 1 > rs[i]) {
        ans += 2 * r[i] + n - i;
        ans += 2 * (l[i] - l[up[ls[i] - rs[i] + 1]] -
                    (i - up[ls[i] - rs[i] + 1]) * (ls[i] - rs[i]));
      } else {
        ans += 2 * l[i] + i - 1;
        ans += 2 * (r[i] - r[dn[rs[i] - ls[i]]] -
                    (dn[rs[i] - ls[i]] - i) * (rs[i] - ls[i] - 1));
      }
    } else {
      if (ls[i] < rs[i] + 1) {
        ans += 2 * l[i] + i - 1;
        ans += 2 * (r[i] - r[dn[rs[i] - ls[i] + 1]] -
                    (dn[rs[i] - ls[i] + 1] - i) * (rs[i] - ls[i]));
      } else {
        ans += 2 * r[i] + n - i;
        ans += 2 * (l[i] - l[up[ls[i] - rs[i]]] -
                    (i - up[ls[i] - rs[i]]) * (ls[i] - rs[i] - 1));
      }
    }
    printf("%lld ", ans);
  }
  printf("\n");
}
