#include <bits/stdc++.h>
using namespace std;
struct Node {
  int l, r;
};
Node node[10000];
int degree[10000], ans[10000], real_ans[10000];
vector<int> v, e[10000];
int totn, n;
int main() {
  string s;
  cin >> n;
  cin >> s;
  node[0].l = node[0].r = 0;
  memset(degree, 0, sizeof degree);
  totn = 1;
  for (int j = 0; j < (int)s.length(); ++j) {
    if (s[j] != '=') {
      node[totn - 1].r = j;
      node[totn].l = node[totn].r = j + 1;
      if (s[j] == 'L') {
        e[totn].push_back(totn - 1);
        ++degree[totn - 1];
      } else {
        e[totn - 1].push_back(totn);
        ++degree[totn];
      }
      ++totn;
    }
  }
  node[totn - 1].r = n - 1;
  queue<int> q;
  for (int i = 0; i < totn; ++i) {
    if (degree[i] == 0) {
      q.push(i);
      ans[i] = 1;
    }
  }
  while (!q.empty()) {
    queue<int> q2;
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (int i = 0; i < (int)e[v].size(); ++i) {
        if (--degree[e[v][i]] == 0) {
          q2.push(e[v][i]);
          ans[e[v][i]] = ans[v] + 1;
        }
      }
    }
    q = q2;
  }
  for (int i = 0; i < totn; ++i) {
    for (int j = node[i].l; j <= node[i].r; ++j) {
      real_ans[j] = ans[i];
    }
  }
  cout << real_ans[0];
  for (int i = 1; i < n; ++i) {
    cout << " " << real_ans[i];
  }
  cout << endl;
  return 0;
}
