#include <iostream>
#include <algorithm>

using namespace std;


int main(){
	while(1){
		int N;
		cin>>N;
		if(N==0)
			break;
		int person[N];
		for(int i=0;i<N;i++)
			person[i]=0;
		int mcount=0;
		for(int i=0;i<100;i++){
			char c;
			cin>>c;
			switch(c){
				case 'M':
					person[i%N]++;
					break;
				case 'L':
					person[i%N]=mcount+person[i%N]+1;
					mcount=0;
					break;	
				case 'S':
					mcount=person[i%N]+mcount+1;
					person[i%N]=0;
					break;
			}
		}		
		sort(person,person+N);
		for(int i=0;i<N;i++)
			cout<<person[i]<<' ';
		cout<<mcount<<endl;
		
	}
	return 0;
}
	