#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using pill = pair<int, ll>;
using vvi = vector<vi>;
ll gcd(ll a, ll b) {
  ll t;
  while ((t = a % b) != 0) {
    a = b;
    b = t;
  }
  return b;
}
ll fast_exp(ll base, ll n, ll m) {
  if (n == 0) return 1;
  ll t = fast_exp(base, n / 2, m);
  if (n % 2 == 0)
    return (t * t) % m;
  else
    return (((t * t) % m) * base) % m;
}
bool is_set(int i, ll mask) { return (mask >> i) & 1; }
int count_bits(ll mask) {
  int ans = 0;
  for (int i = 0; i < 64; ++i)
    if (is_set(i, mask)) ++ans;
  return ans;
}
int first_bit(ll mask) {
  int i = 0;
  while (i < 64)
    if (is_set(i++, mask)) return i - 1;
  return -1;
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; ++i) s[i] = (s[i] == 'U' ? 'R' : 'L');
  vll ls, rs, cl, cr;
  for (ll i = 0; i < n; ++i) {
    if (s[i] == 'R') {
      rs.push_back(i);
      if (rs.size() == 1)
        cr.push_back(i);
      else
        cr.push_back(cr.back() + i);
    } else {
      ls.push_back(i);
      if (ls.size() == 1)
        cl.push_back(i);
      else
        cl.push_back(cl.back() + i);
    }
  }
  for (ll i = 0; i < n; ++i) {
    ll ans = 0;
    if (s[i] == 'R') {
      auto it = lower_bound(ls.begin(), ls.end(), i);
      ll x = ls.end() - it;
      auto jt = lower_bound(rs.begin(), rs.end(), i);
      ll y = jt - rs.begin();
      ll st1, ed1, st2, ed2;
      if (x > y) {
        st1 = it - ls.begin(), ed1 = st1 + y;
        ed2 = y - 1, st2 = 0;
        ans += -i + 1;
      } else {
        st1 = it - ls.begin(), ed1 = st1 + x - 1;
        ed2 = y - 1, st2 = ed2 - x + 1;
        ans += n - i;
      }
      if (st1 <= ed1) ans += 2 * (cl[ed1] - (st1 > 0 ? cl[st1 - 1] : 0));
      if (ed2 >= 0 and st2 <= ed2)
        ans -= 2 * (cr[ed2] - (st2 > 0 ? cr[st2 - 1] : 0));
    } else {
      auto it = upper_bound(ls.begin(), ls.end(), i);
      ll x = ls.end() - it;
      auto jt = lower_bound(rs.begin(), rs.end(), i);
      ll y = jt - rs.begin();
      ll st1, ed1, st2, ed2;
      if (y > x) {
        st1 = it - ls.begin(), ed1 = st1 + x - 1;
        ed2 = y - 1, st2 = ed2 - x;
        ans += n + i;
      } else {
        st1 = it - ls.begin(), ed1 = st1 + y - 1;
        ed2 = y - 1, st2 = 0;
        ans += i + 1;
      }
      if (st1 <= ed1) ans += 2 * (cl[ed1] - (st1 > 0 ? cl[st1 - 1] : 0));
      if (ed2 >= 0 and st2 <= ed2)
        ans -= 2 * (cr[ed2] - (st2 > 0 ? cr[st2 - 1] : 0));
    }
    cout << ans << " ";
  }
  cout << "\n";
  return 0;
}
