#include <bits/stdc++.h>
using namespace std;
int n;
string str;
int ups[1000010], downs[1000010];
long long sumup[1000010], sumdown[1000010];
int upn = 0, downn = 0;
int steps[1000010];
int lb(int *arr, int len, int k) {
  int beg = 0, end = len - 1;
  int mid;
  while (beg <= end) {
    mid = beg + (end - beg) / 2;
    if (arr[mid] < k)
      beg = mid + 1;
    else if (arr[mid] >= k)
      end = mid - 1;
  }
  return end;
}
int ub(int *arr, int len, int k) {
  int beg = 0, end = len - 1;
  int mid;
  while (beg <= end) {
    mid = beg + (end - beg) / 2;
    if (arr[mid] <= k)
      beg = mid + 1;
    else if (arr[mid] > k)
      end = mid - 1;
  }
  return beg;
}
long long calculate(int k) {
  long long sum = 0;
  int beg;
  if (str[k] == 'D') {
    beg = lb(ups, upn, k);
    if (beg == -1)
      return k + 1;
    else
      sum += k - ups[beg];
  } else
    beg = lb(ups, upn, k + 1);
  int end = ub(downs, downn, k);
  if (beg + 1 > downn - end) {
    int extent = downn - end;
    sum += n + 2 * sumdown[end] -
           2 * (sumup[beg] -
                (beg - extent - 1 >= 0 ? sumup[beg - extent - 1] : 0)) +
           ups[beg];
  } else {
    int extent = beg + 1;
    sum += 2 * (sumdown[end] -
                (end + extent < downn ? sumdown[end + extent] : 0)) -
           2 * sumup[beg] + ups[beg] + 1;
  }
  return sum;
}
void solve() {
  long long sum = 0;
  int i;
  for (i = 0; i < upn; i++) {
    sum += ups[i];
    sumup[i] = sum;
  }
  sum = 0;
  for (i = downn - 1; i >= 0; i--) {
    sum += downs[i];
    sumdown[i] = sum;
  }
  for (i = 0; i < n; i++) cout << calculate(i) << " ";
}
int main() {
  cin >> n;
  cin >> str;
  int i;
  for (i = 0; i < str.size(); i++) {
    if (str[i] == 'U')
      ups[upn++] = i;
    else
      downs[downn++] = i;
  }
  solve();
}
