#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
const int inf = (int)1e9 + 1;
const long long big = (long long)1e18 + 1;
const int P = 239;
const int MOD = (int)1e9 + 7;
const int MOD1 = (int)1e9 + 9;
const double eps = 1e-9;
const double pi = atan2(0, -1);
const int ABC = 26;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<long long> pref, suff;
  for (int i = n - 1; i > 0; i--)
    if (s[i] == 'D') {
      if ((int)suff.size() == 0)
        suff.push_back(i);
      else
        suff.push_back(suff.back() + i);
    }
  for (int i = 0; i < n; i++) {
    long long cnt = min((int)pref.size(), (int)suff.size());
    if (s[i] == 'D') {
      if (cnt == (int)pref.size()) {
        long long ans = 0;
        if ((int)pref.size() > 0) ans += 2 * (i * cnt - pref.back());
        if ((int)suff.size() > 0)
          ans += 2 * ((suff.back() - ((int)suff.size() > cnt
                                          ? suff[(int)suff.size() - cnt - 1]
                                          : 0)) -
                      i * cnt);
        ans += (i + 1);
        cout << ans << " ";
      } else {
        long long ans = 0;
        ans += 2 * (i * (cnt + 1) -
                    (pref.back() - ((int)pref.size() > cnt + 1
                                        ? pref[(int)pref.size() - (cnt + 1) - 1]
                                        : 0)));
        if ((int)suff.size() > 0) ans += 2 * (suff.back() - i * cnt);
        ans += (n - i);
        cout << ans << " ";
      }
    } else {
      if (cnt == (int)suff.size()) {
        long long ans = 0;
        if ((int)suff.size() > 0) ans += 2 * (suff.back() - i * cnt);
        if ((int)pref.size() > 0)
          ans += 2 * (i * cnt -
                      (pref.back() - ((int)pref.size() > cnt
                                          ? pref[(int)pref.size() - cnt - 1]
                                          : 0)));
        ans += (n - i);
        cout << ans << " ";
      } else {
        long long ans = 0;
        ans += 2 * ((suff.back() - ((int)suff.size() > cnt + 1
                                        ? suff[(int)suff.size() - (cnt + 1) - 1]
                                        : 0)) -
                    i * (cnt + 1));
        if ((int)pref.size() > 0) ans += 2 * (i * cnt - pref.back());
        ans += (i + 1);
        cout << ans << " ";
      }
    }
    if (s[i] == 'U') {
      if ((int)pref.size() == 0)
        pref.push_back(i);
      else
        pref.push_back(pref.back() + i);
    }
    if (i + 1 < n && s[i + 1] == 'D') suff.pop_back();
  }
  return 0;
}
