#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	while(true){
		int n;
		cin>>n;
		if(n==0)break;
		string c;
		cin>>c;
		int mai[10];
		for(int i=0;i<n;i++){
			mai[i]=0;
		}
		int ba=0;
		int turn=0;
		for(int i=0;i<c.size();i++){
			if(c[i]=='M')
				mai[turn]++;
			else if(c[i]=='S'){
				mai[turn]++;
				ba+=mai[turn];
				mai[turn]=0;
			}
			else{
				mai[turn]++;
				mai[turn]+=ba;
				ba=0;
			}
			turn++;
			turn%=n;
		}
		sort(mai,mai+n,less<int>());
		for(int i=0;i<n;i++){
			cout<<mai[i]<<" ";
		}
		cout<<ba<<endl;
	}
	return 0;
}