#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
struct Sync_stdio {
  Sync_stdio() {
    cin.tie(NULL);
    ios_base::sync_with_stdio(false);
  }
} _sync_stdio;
struct FAIL {
  FAIL() {
    cout << "CHANGE!!!"
         << "\n";
  }
};
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<long long> up;
  vector<long long> down;
  for (int i = (0); i < (n); ++i) {
    if (s[i] == 'U') {
      up.push_back(i);
    } else {
      down.push_back(i);
    }
  }
  vector<long long> upsum = up;
  vector<long long> downsum = down;
  upsum.insert(upsum.begin(), 0LL);
  downsum.insert(downsum.begin(), 0LL);
  for (int i = (1); i < (upsum.size()); ++i) {
    upsum[i] += upsum[i - 1];
  }
  for (int i = (1); i < (downsum.size()); ++i) {
    downsum[i] += downsum[i - 1];
  }
  for (int i = (0); i < (n); ++i) {
    int posu = lower_bound(up.begin(), up.end(), i) - up.begin();
    int posd = upper_bound(down.begin(), down.end(), i) - down.begin();
    int cntu = posu;
    int cntd = int(down.size()) - posd;
    cntu = min(cntu, cntd + 1);
    cntd = min(cntd, cntu + 1);
    if (s[i] == 'U') {
      cntu = min(cntu, cntd);
    } else {
      cntd = min(cntd, cntu);
    }
    long long res = 2 * (downsum[posd + cntd] - downsum[posd]) -
                    2 * (upsum[posu] - upsum[posu - cntu]);
    if (s[i] == 'D') {
      if (cntu > cntd) {
        res += n;
      } else {
        res -= -1;
      }
      res += i;
    } else {
      if (cntu < cntd) {
        res -= -1;
      } else {
        res += n;
      }
      res -= i;
    }
    cout << res << " ";
  }
}
