#include <bits/stdc++.h>
using namespace std;
vector<int> graph[1005], topoSort;
int visited[1005], prevEq[1005], dp[1005];
char S[1005];
void dfs(int node) {
  int i, temp;
  for (i = 0; i < graph[node].size(); i++) {
    temp = graph[node][i];
    if (visited[prevEq[temp]] == 0) {
      visited[prevEq[temp]] = 1;
      dfs(prevEq[temp]);
      topoSort.push_back(prevEq[temp]);
    }
  }
  return;
}
int main() {
  int i, j, t, n, m, k, l, r, temp, mini, maxi, flag, result, cnt;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    prevEq[i] = i;
    dp[i] = 1;
  }
  scanf("%s", S);
  for (i = 0; S[i]; i++) {
    if (S[i] == 'L')
      graph[i + 2].push_back(prevEq[i + 1]);
    else if (S[i] == '=')
      prevEq[i + 2] = prevEq[i + 1];
    else
      graph[prevEq[i + 1]].push_back(i + 2);
  }
  for (i = 1; i <= n; i++) {
    if (visited[prevEq[i]] == 0) {
      visited[prevEq[i]] = 1;
      dfs(prevEq[i]);
      topoSort.push_back(prevEq[i]);
    }
  }
  reverse(topoSort.begin(), topoSort.end());
  for (i = 0; i < topoSort.size(); i++) {
    temp = topoSort[i];
    for (j = 0; j < graph[temp].size(); j++) {
      flag = graph[temp][j];
      dp[flag] = max(dp[flag], dp[temp] + 1);
    }
  }
  for (i = 1; i <= n; i++)
    if (prevEq[i] != i) dp[i] = dp[prevEq[i]];
  for (i = 1; i <= n; i++) printf("%d ", dp[i]);
  printf("\n");
  return 0;
}
