#include<iostream>
using namespace std;
int main()
{
	int N,T,ba,play[10];
	char H[100];
	while(1){
		ba = 0;
		cin >> N;
		for(int i=0;i<10;i++) play[i]=0;
		if(N==0) break;
		cin >> H;
		for(int i=0;i<100;i++){
			if(H[i] == 'M')
				play[i%N]++;
			else if(H[i] == 'S'){
				play[i%N]++;
				ba = ba + play[i%N];
				play[i%N] = 0;
			}
			else if(H[i] == 'L'){
				play[i%N]++;
				play[i%N] = play[i%N] + ba;
				ba = 0;
			}
		}
		for(int i=0;i<N-1;i++){
			for(int j=i+1;j<N;j++){
				if(play[i] > play[j]){
					T = play[i];
					play[i] = play[j];
					play[j] = T;
				}
			}
		}
		for(int i=0;i<N;i++){
			cout << play[i] << " ";
		}
		cout << ba << endl;
	}
	return 0;
}