#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

int main(){
  int N, i, j;
  char c;
  while(cin >> N, N){
    int ba = 0;
    vector<int> player(100, 0);
    for(j = 0; j < 100;){
      for(i = 0; i < N; i++, j++){
	if(j == 100) break;
	cin >> c;
	if(c == 'S') {
	  ba += player[i] + 1;
	  player[i] = 0;
	}
	else if(c == 'L') {
	  player[i] += ba + 1;
	  ba = 0;
	}
	else if(c == 'M')
	  player[i]++;
      }
    }
    sort(player.begin(), player.begin() + N);
    for(i = 0; i < N; i++)
      cout << player[i] << ' ';
    cout << ba << endl;
    
  }
  return 0;
}