#include <bits/stdc++.h>
using namespace std;
const int N = 1000000;
int n;
string s;
long long pref[N];
long long suf[N];
long long prefcol[N];
long long sufcol[N];
int prefind[N + 1];
int sufind[N + 1];
int main() {
  srand(time(NULL));
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cin >> s;
  pref[0] = 0;
  prefcol[0] = 0;
  for (int i = 1; i < n; i++)
    if (s[i] == 'D') {
      suf[0] += i;
      sufcol[0]++;
    }
  for (int i = 1; i < n; i++) {
    prefcol[i] = prefcol[i - 1];
    pref[i] = pref[i - 1] + prefcol[i - 1];
    sufcol[i] = sufcol[i - 1];
    suf[i] = suf[i - 1] - sufcol[i - 1];
    if (s[i - 1] == 'U') {
      prefcol[i]++;
      pref[i]++;
    }
    if (s[i] == 'D') {
      sufcol[i]--;
    }
  }
  int cur = 1;
  for (int i = 0; i < n; i++)
    if (s[i] == 'U') {
      prefind[cur] = i;
      cur++;
    }
  cur = 1;
  for (int i = n - 1; i >= 0; i--)
    if (s[i] == 'D') {
      sufind[cur] = i;
      cur++;
    }
  sufind[0] = n - 1;
  prefind[0] = 0;
  if (s[0] == 'D')
    cout << "1 ";
  else if (sufcol[0] != 0)
    cout << 2LL * sufind[sufcol[0]] + 1 << " ";
  else
    cout << n << " ";
  for (int i = 1; i < n; i++) {
    long long ans = 0;
    if (s[i] == 'D') {
      if (prefcol[i] <= sufcol[i]) {
        ans = 2LL *
              (pref[i] + (suf[i] - (suf[sufind[sufcol[i] - prefcol[i]]] +
                                    (sufcol[i] - prefcol[i]) *
                                        (sufind[sufcol[i] - prefcol[i]] - i))));
        ans += i + 1;
      } else {
        ans = 2LL * (suf[i] +
                     (pref[i] - (pref[prefind[prefcol[i] - sufcol[i]]] +
                                 (prefcol[i] - sufcol[i]) *
                                     (i - prefind[prefcol[i] - sufcol[i]]))));
        ans += 2LL * (i - prefind[prefcol[i] - sufcol[i]]);
        ans += n - i;
      }
    } else {
      if (sufcol[i] <= prefcol[i]) {
        ans = 2LL * (suf[i] +
                     (pref[i] - (pref[prefind[prefcol[i] - sufcol[i]]] +
                                 (prefcol[i] - sufcol[i]) *
                                     (i - prefind[prefcol[i] - sufcol[i]]))));
        ans += n - i;
      } else {
        ans = 2LL *
              (pref[i] + (suf[i] - (suf[sufind[sufcol[i] - prefcol[i]]] +
                                    (sufcol[i] - prefcol[i]) *
                                        (sufind[sufcol[i] - prefcol[i]] - i))));
        ans += 2LL * (sufind[sufcol[i] - prefcol[i]] - i);
        ans += i + 1;
      }
    }
    cout << ans << " ";
  }
  cout << "\n";
  return 0;
}
