#include <bits/stdc++.h>
using namespace std;
long long int ans[1000005];
vector<int> posU;
vector<int> posD;
long long cumU[1000005];
long long int cumD[1000005];
long long int ans2[1000005];
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == 'U')
      posU.push_back(i);
    else
      posD.push_back(i);
  }
  for (int i = 0; i < posU.size(); ++i) {
    cumU[i + 1] = 2 * (posU[i] + 1);
    cumU[i + 1] += cumU[i];
  }
  for (int j = 0; j < posD.size(); ++j) {
    cumD[j + 1] = 2 * (posD[j] + 1);
    cumD[j + 1] += cumD[j];
  }
  long long int uindex = 0;
  long long int dindex = 0;
  for (long long int i = 0; i < s.size(); ++i) {
    if (s[i] == 'U') {
      if (uindex >= posD.size() - dindex) {
        ans[i] = cumD[posD.size()] - cumD[dindex] -
                 2 * (posD.size() - dindex) * (i + 1) + (s.size() - i);
        ans[i] = ans[i] + 2ll * (posD.size() - dindex) * (i + 1) -
                 (cumU[uindex] - cumU[uindex - posD.size() + dindex]);
      } else {
        ans[i] = cumD[dindex + uindex + 1] - cumD[dindex] -
                 2 * (uindex + 1) * (i + 1);
        ans[i] = ans[i] + 2 * uindex * (i + 1) - cumU[uindex] + (i + 1);
      }
      ++uindex;
    }
    if (s[i] == 'D') {
      ++dindex;
    }
  }
  posU.clear();
  posD.clear();
  reverse(s.begin(), s.end());
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == 'D') {
      posU.push_back(i);
    } else
      posD.push_back(i);
  }
  for (int i = 0; i < posU.size(); ++i) {
    cumU[i + 1] = 2 * (posU[i] + 1);
    cumU[i + 1] += cumU[i];
  }
  for (int j = 0; j < posD.size(); ++j) {
    cumD[j + 1] = 2 * (posD[j] + 1);
    cumD[j + 1] += cumD[j];
  }
  uindex = 0;
  dindex = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == 'D') {
      if (uindex >= posD.size() - dindex) {
        ans2[i] = cumD[posD.size()] - cumD[dindex] -
                  2 * (posD.size() - dindex) * (i + 1) + (s.size() - i);
        ans2[i] = ans2[i] + 2ll * (posD.size() - dindex) * (i + 1) -
                  (cumU[uindex] - cumU[uindex - posD.size() + dindex]);
      } else {
        ans2[i] = cumD[dindex + uindex + 1] - cumD[dindex] -
                  2 * (uindex + 1) * (i + 1);
        ans2[i] = ans2[i] + 2 * uindex * (i + 1) - cumU[uindex] + (i + 1);
      }
      ++uindex;
    }
    if (s[i] == 'U') {
      ++dindex;
    }
  }
  for (int i = 0; i < s.size(); ++i) {
    cout << ans[i] + ans2[s.size() - 1 - i] << " ";
  }
  cout << endl;
  return 0;
}
