#include <bits/stdc++.h>
using namespace std;
void Read(int &x) {
  char c;
  while (c = getchar(), c != EOF)
    if (c >= '0' && c <= '9') {
      x = c - '0';
      while (c = getchar(), c >= '0' && c <= '9') x = x * 10 + c - '0';
      ungetc(c, stdin);
      return;
    }
}
char a[1000000 + 10];
int n, cnt1, cnt2;
long long sum1[1000000 + 10], sum2[1000000 + 10];
void read() {
  Read(n);
  scanf("%s", a + 1);
}
void solve() {
  int i, j = 0, k;
  for (i = 1; i <= n; i++) {
    if (a[i] == 'U') {
      cnt1++;
      sum1[cnt1] = sum1[cnt1 - 1] + i;
    }
  }
  for (i = n; i; i--) {
    if (a[i] == 'D') {
      cnt2++;
      sum2[cnt2] = sum2[cnt2 - 1] + i;
    }
  }
  k = cnt2;
  long long ans;
  for (i = 1; i <= n; i++) {
    if (a[i - 1] == 'U') j++;
    if (a[i] == 'D') k--;
    ans = 2 * (i * min(j, k) - sum1[j] + sum1[j - min(j, k)]) +
          2 * (sum2[k] - sum2[k - min(j, k)] - i * min(j, k));
    if (j == k) {
      if (a[i] == 'U')
        printf("%I64d ", ans + n - i + 1);
      else
        printf("%I64d ", ans + i);
    } else if (j < k) {
      if (a[i] == 'D')
        printf("%I64d ", ans + i);
      else
        printf("%I64d ", ans + (sum2[k - j] - sum2[k - j - 1]) * 2 - i);
    } else {
      if (a[i] == 'U')
        printf("%I64d ", ans + n - i + 1);
      else
        printf("%I64d ", ans - (sum1[j - k] - sum1[j - k - 1]) * 2 + n + 1 + i);
    }
  }
}
int main() {
  read();
  solve();
}
