#include <bits/stdc++.h>
using namespace std;
string s;
int a[1005], n, dp[1005][1005], MinL[1005], MinR[1005];
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    dp[i][0] = 1000000007;
    for (int j = 0; j <= (n + 1); j++) {
      dp[i][j] = 1000000007;
    }
  }
  for (int i = 1; i <= n; i++) {
    dp[0][i] = i;
  }
  MinL[0] = dp[0][0];
  MinR[n + 1] = dp[0][n + 1];
  int ans = 1000000007;
  for (int i = 1; i < n; i++) {
    for (int j = 1; j <= (n + 1); j++) {
      MinL[j] = min(dp[i - 1][j], MinL[j - 1]);
    }
    for (int j = n; j >= 0; j--) {
      MinR[j] = min(dp[i - 1][j], MinR[j + 1]);
    }
    for (int j = 1; j <= n; j++) {
      if (s[i - 1] == 'L') {
        dp[i][j] = min(dp[i][j], MinR[j + 1] + j);
      } else if (s[i - 1] == 'R') {
        dp[i][j] = min(dp[i][j], MinL[j - 1] + j);
      } else {
        dp[i][j] = min(dp[i][j], dp[i - 1][j] + j);
      }
      if (i == n - 1) {
        ans = min(ans, dp[i][j]);
      }
    }
  }
  vector<int> res;
  for (int i = n - 1; i >= 0; i--) {
    for (int j = 1; j <= n; j++) {
      if (dp[i][j] == ans) {
        res.push_back(j);
        ans -= j;
        break;
      }
    }
  }
  while (res.size() > 0) {
    cout << res.back() << " ";
    res.pop_back();
  }
  return 0;
}
