#include <bits/stdc++.h>
using namespace std;
long long N;
string S;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  cin >> S;
  vector<long long> ku;
  vector<long long> kd;
  ku.resize(N);
  kd.resize(N);
  ku[0] = 0;
  for (long long i = 1; i < N; ++i) {
    ku[i] = ku[i - 1] + (S[i - 1] == 'U');
  }
  kd[N - 1] = 0;
  for (long long i = N - 2; i >= 0; --i) {
    kd[i] = kd[i + 1] + (S[i + 1] == 'D');
  }
  vector<long long> tl;
  vector<long long> tr;
  tl.resize(N);
  tr.resize(N);
  tl[0] = 1;
  for (long long i = 1; i < N; ++i) {
    tl[i] = tl[i - 1] + ku[i] * 2 + 1;
  }
  tr[N - 1] = 1;
  for (long long i = N - 2; i >= 0; --i) {
    tr[i] = tr[i + 1] + kd[i] * 2 + 1;
  }
  vector<long long> posd;
  vector<long long> posu;
  posd.reserve(N);
  posu.reserve(N);
  for (long long i = 0; i < N; ++i) {
    if (S[i] == 'D') {
      posd.push_back(i);
    }
    if (S[i] == 'U') {
      posu.push_back(i);
    }
  }
  reverse(posd.begin(), posd.end());
  for (long long i = 0; i < N; ++i) {
    if ((kd[i] > ku[i]) || (kd[i] == ku[i] && S[i] == 'D')) {
      long long f = (S[i] == 'D') ? 0 : 1;
      long long x = kd[i] - ku[i] - f;
      long long ans =
          tl[i] + tr[i] - tr[posd[x]] - (posd[x] - i) - 2 * x * (posd[x] - i);
      cout << ans;
    } else {
      long long f = (S[i] == 'U') ? 0 : 1;
      long long x = ku[i] - kd[i] - f;
      long long ans =
          tl[i] + tr[i] - tl[posu[x]] - (i - posu[x]) - 2 * x * (i - posu[x]);
      cout << ans;
    }
    if (i == N - 1) {
      cout << endl;
    } else {
      cout << " ";
    }
  }
  return 0;
}
