#include <bits/stdc++.h>
using namespace std;
long long N;
string s;
bool dir[1100000];
long long u[1100000], d[1100000];
long long ans[1100000];
int32_t main() {
  ios_base::sync_with_stdio(false);
  if (fopen("cf733e.in", "r")) {
    freopen("cf733e.in", "r", stdin);
    freopen("cf733e.out", "w", stdout);
  }
  cin >> N >> s;
  s = "x" + s;
  for (long long i = 1; i <= N; i++) {
    if (s[i] == 'U') {
      dir[i] = true;
    } else {
      dir[i] = false;
    }
  }
  for (long long i = 1; i <= N; i++) {
    u[i] = u[i - 1] + dir[i];
    d[i] = d[i - 1] + (!dir[i]);
  }
  d[N + 1] = d[N];
  u[N + 1] = u[N];
  long long l = 1, r = 1, sum = 0;
  for (long long i = 1; i <= N; i++) {
    long long step = 0;
    if (i != 1) {
      sum += ((u[i - 1] - u[l - 1]) - (d[r] - d[i - 1])) * 2;
    }
    if (dir[i]) {
      long long lu = u[i];
      long long rd = d[N] - d[i - 1];
      long long k = min(lu, rd);
      if (lu <= rd) {
        step = i;
      } else {
        step = N - i + 1;
      }
      while (r <= N && d[r] - d[i] < k) {
        if (!dir[r + 1]) {
          sum += (r - i + 1) * 2;
        }
        r++;
      }
      while (l <= i && u[i - 1] - u[l - 1] > k) {
        if (dir[l]) {
          sum -= (i - l) * 2;
        }
        l++;
      }
    } else {
      long long lu = u[i];
      long long rd = d[N] - d[i - 1];
      long long k = min(lu, rd);
      if (lu < rd) {
        step = i;
      } else {
        step = N - i + 1;
      }
      while (r <= N && d[r] - d[i] < k) {
        if (!dir[r + 1] && r != N) {
          sum += (r - i + 1) * 2;
        }
        r++;
      }
      while (u[i] - u[l - 1] > k) {
        if (dir[l]) {
          sum -= (i - l) * 2;
        }
        l++;
      }
    }
    step += sum;
    ans[i] = step;
  }
  cout << ans[1];
  for (long long i = 2; i <= N; i++) {
    cout << ' ' << ans[i];
  }
  cout << '\n';
  return 0;
}
