#include <bits/stdc++.h>
using namespace std;
int n;
char data[1000000];
vector<int> chptL;
vector<int> chptR;
int chptCntL[1000000];
int chptCntR[1000000];
long long cumChptL[1000000];
long long cumChptR[1000000];
int main() {
  scanf("%d", &n);
  char c;
  while (c = getchar(), c != 'D' && c != 'U')
    ;
  for (int i = 0; i < n; i++) {
    data[i] = c;
    c = getchar();
  }
  chptCntL[0] = 0;
  chptCntR[0] = 0;
  for (int i = 0; i < n; i++) {
    if (i != 0) {
      chptCntL[i] = chptCntL[i - 1];
      chptCntR[i] = chptCntR[i - 1];
      cumChptL[i] = cumChptL[i - 1];
      cumChptR[i] = cumChptR[i - 1];
    }
    if (data[i] == 'D') {
      chptL.push_back(i);
      chptCntL[i]++;
      cumChptL[i] += i;
    }
    if (data[i] == 'U') {
      chptR.push_back(i);
      chptCntR[i]++;
      cumChptR[i] += i;
    }
  }
  for (int i = 0; i < n; i++) {
    vector<int>& chptMyL = chptR;
    vector<int>& chptMyR = chptL;
    long long ans = 0;
    int LchptCnt = i == 0 ? 0 : chptCntR[i - 1];
    int RchptCnt = chptCntL[n - 1] - chptCntL[i];
    char escape;
    int espCntL, espCntR;
    espCntL = espCntR = min(LchptCnt, RchptCnt);
    if (LchptCnt != RchptCnt) {
      escape = LchptCnt < RchptCnt ? 'D' : 'U';
      if (escape == 'D') espCntR += data[i] == 'U';
      if (escape == 'U') espCntL += data[i] == 'D';
    } else {
      escape = data[i];
    }
    int LmostChpt, RmostChpt;
    long long tl, tr;
    if (espCntL != 0) {
      LmostChpt = *(lower_bound(chptMyL.begin(), chptMyL.end(), i) - espCntL);
      tl = ((long long)i - LmostChpt) * (espCntL) -
           (cumChptR[i - 1] - cumChptR[LmostChpt] -
            ((long long)LmostChpt) * (espCntL - 1));
      ans += tl * 2;
    }
    if (espCntR != 0) {
      RmostChpt =
          *(upper_bound(chptMyR.begin(), chptMyR.end(), i) + espCntR - 1);
      tr = cumChptL[RmostChpt] - cumChptL[i] - ((long long)i) * espCntR;
      ans += tr * 2;
    }
    ans += (escape == 'D') ? i + 1 : n - i;
    printf("%lld\n", ans);
  }
}
