#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, i, n;
  scanf("%lld", &n);
  char str[n + 1];
  scanf("%s", str);
  long long dc = 0, uc = 0;
  long long darr[n], uarr[n];
  long long dsums[n + 1];
  dsums[0] = 0;
  for (i = 0; i < n; i++) {
    if (str[i] == 'D') {
      darr[dc] = i;
      dc++;
      dsums[i + 1] = dsums[i] + i + 1;
    } else {
      uarr[uc] = i;
      uc++;
      dsums[i + 1] = dsums[i];
    }
  }
  long long usums[n + 1];
  usums[n] = 0;
  for (i = n - 1; i >= 0; i--) {
    if (str[i] == 'U')
      usums[i] = (n - i) + usums[i + 1];
    else
      usums[i] = usums[i + 1];
  }
  long long uct = 0, dct = 0, cycs, back, forw, ans;
  bool is_u;
  for (i = 0; i < n; i++) {
    is_u = (str[i] == 'U');
    if (!is_u) dct++;
    back = uct;
    forw = dc - dct;
    cycs = min(back, forw);
    ans = 0;
    if (cycs > 0) {
      ans =
          (dsums[darr[dct + cycs - 1] + 1] - dsums[i + 1] - (i + 1) * cycs) * 2;
      ans += (usums[uarr[uct - cycs]] - usums[i] - (n - i) * cycs) * 2;
    }
    cycs++;
    if (is_u) {
      if (back >= forw) {
        ans += n - 1 - i + 1;
      } else {
        ans += (darr[dct + cycs - 1] - i) + (darr[dct + cycs - 1] + 1);
      }
    } else {
      if (forw >= back) {
        ans += i + 1;
      } else {
        ans += (i - uarr[uct - cycs]) + (n - 1 - uarr[uct - cycs] + 1);
      }
    }
    printf("%lld ", ans);
    if (is_u) uct++;
  }
  return 0;
}
