#include <bits/stdc++.h>
using namespace std;
const char IN[] = "_.in";
const char OUT[] = "_.out";
const int maxn = 2000;
int ntest = 0, test;
string s;
int n, dinh, canh, id;
int x[maxn], y[maxn], link1[maxn], head[maxn], res[maxn], num[maxn], d[maxn],
    c[maxn], fx[maxn], dem = 0;
bool tham[maxn];
void nhap() {
  cin >> n;
  cin >> s;
  dinh = 0;
  for (int i = (0); i <= (n - 2); i++)
    if (s[i] != '=') {
      dem++;
      int u, v;
      if (dinh == 0) {
        int j = i;
        while (j - 1 >= 0 && s[j - 1] == '=') j--;
        dinh++;
        u = dinh;
        d[dinh] = j + 1;
        c[dinh] = i + 1;
      } else
        u = dinh;
      int j = i;
      while (j + 1 <= n - 1 && s[j + 1] == '=') j++;
      dinh++;
      v = dinh;
      d[dinh] = i + 2;
      c[dinh] = j + 2;
      if (s[i] == 'L') {
        canh++;
        x[canh] = v;
        y[canh] = u;
      } else {
        canh++;
        x[canh] = u;
        y[canh] = v;
      }
    }
}
void dfs(int u) {
  tham[u] = true;
  int i = head[u];
  while (i != 0) {
    int v = y[i];
    if (!tham[v]) dfs(v);
    i = link1[i];
  }
  num[id] = u;
  id--;
}
void make() {
  for (int i = (1); i <= (canh); i++) {
    link1[i] = head[x[i]];
    head[x[i]] = i;
  }
  memset((tham), (false), sizeof(tham));
  id = dinh;
  for (int i = (1); i <= (dinh); i++)
    if (!tham[i]) dfs(i);
}
void solve() {
  if (dem == 0) {
    for (int i = (1); i <= (n); i++) cout << 1 << " ";
    return;
  }
  memset((head), (0), sizeof(head));
  for (int i = (1); i <= (canh); i++) {
    link1[i] = head[y[i]];
    head[y[i]] = i;
  }
  for (int i = (1); i <= (dinh); i++) {
    int u = num[i];
    fx[u] = 0;
    int ii = head[u];
    if (ii == 0) fx[u] = 1;
    int ma = 0;
    while (ii != 0) {
      int v = x[ii];
      ma = max(ma, fx[v]);
      ii = link1[ii];
    }
    fx[u] = ma + 1;
  }
  for (int i = (1); i <= (dinh); i++)
    for (int j = (d[i]); j <= (c[i]); j++) res[j] = fx[i];
  for (int i = (1); i <= (n); i++) cout << res[i] << " ";
}
int main() {
  nhap();
  make();
  solve();
  return 0;
}
