#include <bits/stdc++.h>
using namespace std;
const int N = 1010, M = 1e5 + 10;
char str[1010];
int h[N], e[M], ne[M], idx;
int dist[N];
long long w[M];
bool vis[N];
int n;
void add(int a, int b, int d) {
  ne[idx] = h[a];
  h[a] = idx;
  e[idx] = b;
  w[idx] = d;
  idx++;
}
void spfa(int s) {
  queue<int> q;
  q.push(0);
  dist[0] = 0;
  vis[0] = 1;
  while (q.size()) {
    int u = q.front();
    q.pop();
    vis[u] = 0;
    for (int i = h[u]; ~i; i = ne[i]) {
      int v = e[i];
      if (dist[v] > dist[u] + w[i]) {
        dist[v] = dist[u] + w[i];
        if (!vis[v]) {
          vis[v] = 1;
          q.push(v);
        }
      }
    }
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s", str + 1);
  memset(h, -1, sizeof h);
  for (int i = 1; i <= n; i++) {
    if (str[i] == 'L') {
      add(i + 1, i, -1);
    } else if (str[i] == 'R') {
      add(i, i + 1, -1);
    } else {
      add(i, i + 1, 0);
      add(i + 1, i, 0);
    }
  }
  for (int i = 1; i <= n; i++) add(0, i, 0);
  memset(dist, 0x3f, sizeof dist);
  for (int i = 1; i <= n; i++) {
    if (dist[i] == 0x3f3f3f3f) spfa(i);
  }
  for (int i = 1; i <= n; i++) {
    cout << -dist[i] + 1 << " ";
  }
  cout << endl;
}
