#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1e6 + 10;
long long n, lcnt, rcnt, suml[maxN], sumr[maxN], l[maxN], r[maxN];
char a[maxN];
long long lboz[maxN], rboz[maxN];
long long get(long long x) {
  long long left = lboz[x];
  long long right = rboz[x];
  long long lcn = left, rcn = rcnt - right;
  long long sl = 0, sr = 0;
  if (lcn > rcn) {
    sr = sumr[rcnt] - sumr[right];
    sl = suml[left] - suml[left - rcn - 1];
    long long ans = 2 * (sr - sl) + x + n + 1;
    return ans;
  } else {
    sr = sumr[right + lcn] - sumr[right];
    sl = suml[left];
    long long ans = 2 * (sr - sl) + x;
    return ans;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  lcnt = 0;
  for (long long i = 1; i <= n; i++) {
    if (a[i] == 'U') {
      lcnt++;
      l[lcnt] = i;
    }
    lboz[i] = lcnt;
  }
  rcnt = 0;
  for (long long i = 1; i <= n; i++) {
    if (a[i] == 'D') {
      rcnt++;
      r[rcnt] = i;
    }
    rboz[i] = rcnt;
  }
  for (long long i = 1; i <= lcnt; i++) suml[i] = suml[i - 1] + l[i];
  for (long long i = 1; i <= rcnt; i++) sumr[i] = sumr[i - 1] + r[i];
  for (long long i = 1; i <= n; i++) cout << get(i) << " ";
  cout << endl;
  return 0;
}
