#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 10;
int n, a[N], c[N][2];
long long s[N][2];
int pos[2][N], cnt[2];
char S[N];
void Init() {
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < 2; ++j) {
      c[i][j] = c[i - 1][j];
      s[i][j] = s[i - 1][j];
    }
    c[i][a[i]] += 1;
    s[i][a[i]] += i;
    pos[a[i]][++cnt[a[i]]] = i;
  }
}
long long ComputeU(int p) {
  int L = c[p - 1][0];
  int R = c[n][1] - c[p][1];
  long long ans = 0;
  if (L >= R) {
    ans += n + 1 - p;
    ans += 2 * (s[pos[1][p - L - 1 + R]][1] - s[p][1]);
    ans -= 2 * (s[p - 1][0] - s[pos[0][L - R]][0]);
  } else {
    ans -= p;
    ans += 2 * (s[pos[1][p - L - 1 + L + 1]][1] - s[p][1]);
    ans -= 2 * s[p - 1][0];
  }
  return ans;
}
long long ComputeD(int p) {
  int L = c[p - 1][0];
  int R = c[n][1] - c[p][1];
  long long ans = 0;
  if (L > R) {
    ans += n + 1 + p;
    ans += 2 * (s[pos[1][p - L + R]][1] - s[p][1]);
    ans -= 2 * (s[p - 1][0] - s[pos[0][L - R - 1]][0]);
  } else {
    ans += p;
    ans += 2 * (s[pos[1][p - L + L]][1] - s[p][1]);
    ans -= 2 * s[p - 1][0];
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  scanf("%s", S + 1);
  for (int i = 1; i <= n; ++i) a[i] = (S[i] == 'U') ? 0 : 1;
  Init();
  for (int i = 1; i <= n; ++i) {
    if (a[i] == 0)
      printf("%I64d ", ComputeU(i));
    else
      printf("%I64d ", ComputeD(i));
  }
  return 0;
}
