#include <bits/stdc++.h>
const int INF = 100000000;
const double EPS = 1e-10;
const int MOD = 1000000007;
using namespace std;
int n;
char s[1000010];
long long wa1[1000010];
long long wa2[1000010];
int ue = 0;
int st = 0;
int jou, ge;
int main() {
  cin >> n;
  char dummy;
  scanf("%c", &dummy);
  for (int i = 0; i < n; i++) {
    scanf("%c", &s[i]);
  }
  wa1[0] = 0;
  wa2[0] = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'U') {
      ue++;
      wa1[ue] = wa1[ue - 1] + i;
    } else {
      st++;
      wa2[st] = wa2[st - 1] + i;
    }
  }
  jou = st;
  ge = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'D') {
      if (jou > ge) {
        cout << (1 + i + 2 * (wa2[st - jou + ge + 1] - wa2[st - jou + 1]) -
                 2 * wa1[ge]);
      } else {
        cout << (n - i + 2 * (wa2[st] - wa2[st - jou]) -
                 2 * (wa1[ge] - wa1[ge - jou]));
      }
      jou--;
    } else {
      if (jou > ge) {
        cout << (1 + i + 2 * (wa2[st - jou + ge + 1] - wa2[st - jou]) -
                 2 * (wa1[ge + 1]));
      } else {
        cout << (n - i + 2 * (wa2[st] - wa2[st - jou]) -
                 2 * (wa1[ge] - wa1[ge - jou]));
      }
      ge++;
    }
    if (i < n - 1) {
      cout << " ";
    } else {
      cout << endl;
    }
  }
  return 0;
}
