#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
char steps[N];
int n;
long long ans1[N], ans2[N], acc[N];
void solve(long long ans[]) {
  for (int i = n - 1; i >= 0; i--) acc[i] = acc[i + 1] + (steps[i] == 'D');
  long long cur1 = 2;
  long long cur2 = 2;
  vector<int> par;
  par.push_back(-1);
  int ptr1 = 0;
  int ptr2 = 0;
  for (int i = 0; i < n; i++) {
    if (steps[i] == 'D') {
      int dwns = acc[i + 1];
      while (par.size() - ptr1 > dwns + 1) {
        cur1 -= ((i - par[ptr1]) << 1);
        ptr1++;
      }
      ans[i] = cur1;
      if (!ptr1) ans[i] -= (i - par[ptr1]);
    } else {
      int dwns = acc[i + 1];
      while (par.size() - ptr2 > dwns) {
        cur2 -= ((i - par[ptr2]) << 1);
        ptr2++;
      }
      ans[i] = cur2;
      if (!ptr2) ans[i] -= (i - par[ptr2]);
      par.push_back(i);
    }
    cur1 += ((par.size() - ptr1) << 1);
    cur2 += ((par.size() - ptr2) << 1);
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s", steps);
  solve(ans1);
  reverse(steps, steps + n);
  for (int i = 0; i < n; i++) steps[i] = (steps[i] == 'D' ? 'U' : 'D');
  solve(ans2);
  for (int i = 0; i < n; i++)
    printf("%lld%c", ans1[i] + ans2[n - i - 1], (i == n ? '\n' : ' '));
  return 0;
}
