#include <bits/stdc++.h>
using namespace std;
bool home = 1;
signed realMain();
signed main() {
  home = 0;
  if (home) {
    freopen("tony_stark", "r", stdin);
  } else {
    ios::sync_with_stdio(0);
    cin.tie(0);
  }
  realMain();
}
long long get(long long a[], long long start, long long stop) {
  if (start > stop) {
    return 0;
  }
  assert(start >= 1);
  return a[stop] - a[start - 1];
}
string str;
const long long N = (long long)1e6 + 7;
long long n, dir[N], sumrgh[N], sumlft[N], i1, i2, memory[N][2];
signed realMain() {
  cin >> n >> str;
  for (long long i = 1; i <= n; i++) {
    dir[i] = (str[i - 1] == 'U') ? (+1) : (-1);
    if (dir[i] == +1) {
      i1++;
      sumlft[i1] = sumlft[i1 - 1] + i;
    } else {
      i2++;
      sumrgh[i2] = sumrgh[i2 - 1] + i;
    }
    memory[i][0] = i1;
    memory[i][1] = i2;
  }
  for (long long i = 1; i <= n; i++) {
    long long sol = 0, slft = memory[i - 1][0],
              srgh = memory[n][1] - memory[i][1], elft = 0, ergh = 0, finito;
    if (dir[i] == +1) {
      if (srgh <= slft) {
        elft = srgh;
        ergh = srgh;
        finito = n;
      } else {
        elft = slft;
        ergh = slft + 1;
        finito = -1;
      }
    } else {
      if (slft <= srgh) {
        elft = slft;
        ergh = slft;
        finito = -1;
      } else {
        ergh = srgh;
        elft = srgh + 1;
        finito = n;
      }
    }
    sol = 2 * (get(sumrgh, memory[i][1] + 1, memory[i][1] + ergh) -
               get(sumlft, memory[i - 1][0] - elft + 1, memory[i - 1][0])) +
          finito - dir[i] * i + 1;
    cout << sol << " ";
  }
  cout << "\n";
  return 0;
}
