#include <bits/stdc++.h>
using namespace std;
char buf[1000010];
long long sumU[1000010];
long long sumD[1000010];
int main() {
  int len;
  scanf("%d", &len);
  scanf("%s", buf);
  int totD = 0, totU = 0;
  sumD[0] = len + 1;
  for (int i = len - 1; i >= 0; i--)
    if (buf[i] == 'D') sumD[totD + 1] = sumD[totD] + i + 1, ++totD;
  sumU[0] = 0;
  for (int i = 0; i < len; i++) {
    if (buf[i] == 'U') {
      sumU[totU + 1] = sumU[totU] + i + 1, ++totU;
      if (totU <= totD)
        printf("%I64d ",
               2 * (sumD[totD] - sumD[totD - totU]) - 2 * sumU[totU] + i + 1);
      else
        printf("%I64d ", 2 * sumD[totD] + i + 1 - sumD[0] -
                             2 * (sumU[totU] - sumU[totU - totD - 1]));
    } else {
      if (totD <= totU)
        printf("%I64d ", 2 * sumD[totD] - i - 1 - sumD[0] -
                             2 * (sumU[totU] - sumU[totU - totD]));
      else
        printf("%I64d ", 2 * (sumD[totD] - sumD[totD - totU - 1]) -
                             2 * sumU[totU] - i - 1);
      --totD;
    }
  }
  return 0;
}
