#include <bits/stdc++.h>
using namespace std;
int n;
string s;
vector<long long> u, d, su, sd;
long long num(vector<long long>& v, int l, int r);
void solve(string s, vector<long long>& re);
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> s;
  vector<long long> res(n, 0);
  solve(s, res);
  reverse(res.begin(), res.end());
  reverse(s.begin(), s.end());
  for (int i = 0; i < n; ++i) s[i] = char('U' + 'D' - s[i]);
  solve(s, res);
  reverse(res.begin(), res.end());
  for (int i = 0; i < res.size(); ++i) cout << res[i] << " ";
  return 0;
}
void solve(string s, vector<long long>& re) {
  u.clear();
  d.clear();
  su.clear();
  sd.clear();
  u.assign(n, 0);
  d.assign(n, 0);
  for (int i = 0; i < n; ++i) (s[i] == 'U' ? u[i] : d[i]) = 1;
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'U')
      su.push_back(n - i);
    else
      sd.push_back(i + 1);
  }
  for (int i = 1; i < n; ++i) {
    u[i] += u[i - 1];
    d[i] += d[i - 1];
  }
  for (int i = 1; i < su.size(); ++i) su[i] += su[i - 1];
  for (int i = 1; i < sd.size(); ++i) sd[i] += sd[i - 1];
  for (int i = 0; i < n; ++i) {
    long long res = 0;
    if (s[i] == 'D') {
      int a = (i == 0 ? 0 : num(u, 0, i - 1));
      int b = num(d, i, n - 1);
      int c = (i == 0 ? 0 : num(d, 0, i - 1));
      if (a >= b) {
        res += 2 * (num(su, a - b, a - 1) - b * (long long)(n - i)) - b;
        res += 2 * (num(sd, c, c + b - 1) - b * (long long)(i)) - b;
        res += (long long)(n - i);
      } else {
        if (a > 0) res += 2 * (num(su, 0, a - 1) - a * (long long)(n - i)) - a;
        res += 2 * (num(sd, c, c + a + 1 - 1) - (a + 1) * (long long)(i)) -
               (a + 1);
        res += (long long)(i);
      }
      re[i] = res;
    }
  }
}
long long num(vector<long long>& v, int l, int r) {
  if (l == 0) return v[r];
  return v[r] - v[l - 1];
}
