#include <algorithm>
#include <iostream>
#include <string>
using namespace std;

int main()
{
  int c[10];
  string str;
  int n;
  int ba;

  while (cin >> n){
    if (n == 0) break;
    for (int i = 0; i < 10; i++){
      c[i] = 0;
    }
    cin >> str;
    int p = 0;
    ba = 0;
    for (int i = 0; i < 100; i++){
      if (str[i] == 'M'){
        c[p]++;
      }
      if (str[i] == 'S'){
        ba += c[p];
        ba++;
        c[p] = 0;
      }
      if (str[i] == 'L'){
        c[p] += ba;
        c[p]++;
        ba = 0;
      }
      p++;
      if (p >= n){
        p = 0;
      }
    }
    sort(c, c + n);
    
    for (int i = 0; i < n; i++){
      cout << c[i] << " ";
    }
    cout << ba << endl;
  }

  return 0;
}