#include <bits/stdc++.h>
using namespace std;
const int Inf = 1e9 + 7;
const int N = 1e6 + 7;
int n;
string s;
long long ds[N], cds[N];
long long us[N], cus[N];
void solve() {
  cin >> n;
  cin >> s;
  int p = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == 'D') ds[p++] = i;
  for (int i = 0; i < p; i++) cds[i + 1] = cds[i] + ds[i];
  int q = 0;
  for (int i = n - 1; i >= 0; i--)
    if (s[i] == 'U') us[q++] = n - 1 - i;
  for (int i = 0; i < q; i++) cus[i + 1] = cus[i] + us[i];
  int pp = 0;
  int qq = q;
  for (int i = 0; i < n; i++) {
    long long res = 0;
    if (s[i] == 'U') {
      int nd = p - pp;
      int nu = q - qq;
      if (nd <= nu) {
        nu = nd;
        res += ((cds[pp + nd] - cds[pp]) - 1LL * i * nd) * 2;
        res += ((cus[qq + nu] - cus[qq]) - 1LL * (n - 1 - i) * nu) * 2;
        res += n - i;
      } else {
        nd = nu + 1;
        res += ((cds[pp + nd] - cds[pp]) - 1LL * i * nd) * 2;
        res += ((cus[qq + nu] - cus[qq]) - 1LL * (n - 1 - i) * nu) * 2;
        res += i + 1;
      }
      qq--;
    } else {
      pp++;
      int nd = p - pp;
      int nu = q - qq;
      if (nu <= nd) {
        nd = nu;
        res += ((cds[pp + nd] - cds[pp]) - 1LL * i * nd) * 2;
        res += ((cus[qq + nu] - cus[qq]) - 1LL * (n - 1 - i) * nu) * 2;
        res += i + 1;
      } else {
        nu = nd + 1;
        res += ((cds[pp + nd] - cds[pp]) - 1LL * i * nd) * 2;
        res += ((cus[qq + nu] - cus[qq]) - 1LL * (n - 1 - i) * nu) * 2;
        res += n - i;
      }
    }
    cout << res << " ";
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(9);
  cout << fixed;
  solve();
  return 0;
}
