#include <bits/stdc++.h>
using namespace std;
char tmp[1000005];
long long t1[6000005], t2[6000005];
long long l1[6000005], l2[6000005];
void update1(int i, int L, int R, int x, int y, int val) {
  if (l1[i] != 0) {
    t1[i] += l1[i] * 1LL * (R - L + 1);
    if (L != R) {
      l1[i * 2 + 1] += l1[i];
      l1[i * 2 + 2] += l1[i];
    }
    l1[i] = 0;
  }
  if (L >= x && R <= y) {
    l1[i] += val;
    t1[i] += l1[i] * 1LL * (R - L + 1);
    if (L != R) {
      l1[i * 2 + 1] += l1[i];
      l1[i * 2 + 2] += l1[i];
    }
    l1[i] = 0;
    return;
  }
  if (L > y || R < x) return;
  update1(i * 2 + 1, L, (L + R) / 2, x, y, val);
  update1(i * 2 + 2, (L + R) / 2 + 1, R, x, y, val);
  t1[i] = t1[i * 2 + 1] + t1[i * 2 + 2];
}
long long query1(int i, int L, int R, int x, int y) {
  if (l1[i] != 0) {
    t1[i] += l1[i] * 1LL * (R - L + 1);
    if (L != R) {
      l1[i * 2 + 1] += l1[i];
      l1[i * 2 + 2] += l1[i];
    }
    l1[i] = 0;
  }
  if (L >= x && R <= y) return t1[i];
  if (L > y || R < x) return 0;
  return query1(i * 2 + 1, L, (L + R) / 2, x, y) +
         query1(i * 2 + 2, (L + R) / 2 + 1, R, x, y);
}
void update2(int i, int L, int R, int x, int y, int val) {
  if (l2[i] != 0) {
    t2[i] += l2[i] * 1LL * (R - L + 1);
    if (L != R) {
      l2[i * 2 + 1] += l2[i];
      l2[i * 2 + 2] += l2[i];
    }
    l2[i] = 0;
  }
  if (L >= x && R <= y) {
    l2[i] += val;
    t2[i] += l2[i] * 1LL * (R - L + 1);
    if (L != R) {
      l2[i * 2 + 1] += l2[i];
      l2[i * 2 + 2] += l2[i];
    }
    l2[i] = 0;
    return;
  }
  if (L > y || R < x) return;
  update2(i * 2 + 1, L, (L + R) / 2, x, y, val);
  update2(i * 2 + 2, (L + R) / 2 + 1, R, x, y, val);
  t2[i] = t2[i * 2 + 1] + t2[i * 2 + 2];
}
long long query2(int i, int L, int R, int x, int y) {
  if (l2[i] != 0) {
    t2[i] += l2[i] * 1LL * (R - L + 1);
    if (L != R) {
      l2[i * 2 + 1] += l2[i];
      l2[i * 2 + 2] += l2[i];
    }
    l2[i] = 0;
  }
  if (L >= x && R <= y) return t2[i];
  if (L > y || R < x) return 0;
  return query2(i * 2 + 1, L, (L + R) / 2, x, y) +
         query2(i * 2 + 2, (L + R) / 2 + 1, R, x, y);
}
int main() {
  int n;
  cin >> n;
  scanf("%s", tmp);
  string s = tmp;
  int c1 = 0, c2 = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == 'D') {
      update2(0, 0, n - 1, c2, c2, i);
      c2++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i) printf(" ");
    long long ans = 0;
    if (s[i] == 'U') {
      if (c1 < c2) {
        if (c2) ans += query2(0, 0, n - 1, c2 - (c1 + 1), c2 - 1) * 2;
        if (c1) ans += query1(0, 0, n - 1, 0, c1 - 1) * 2;
        ans += i + 1;
      } else {
        if (c2)
          ans += (query2(0, 0, n - 1, 0, c2 - 1) +
                  query1(0, 0, n - 1, c1 - c2, c1 - 1)) *
                 2;
        ans += n - i;
      }
      c1++;
    } else {
      c2--;
      if (c2 < c1) {
        if (c1) ans += query1(0, 0, n - 1, c1 - (c2 + 1), c1 - 1) * 2;
        if (c2) ans += query2(0, 0, n - 1, 0, c2 - 1) * 2;
        ans += n - i;
      } else {
        if (c1)
          ans += (query1(0, 0, n - 1, 0, c1 - 1) +
                  query2(0, 0, n - 1, c2 - c1, c2 - 1)) *
                 2;
        ans += i + 1;
      }
    }
    if (c1) update1(0, 0, n - 1, 0, c1 - 1, 1);
    if (c2) update2(0, 0, n - 1, 0, c2 - 1, -1);
    printf("%I64d", ans);
  }
  return 0;
}
