#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	while(1){
		int N,a[10],ba=0,counter=0;
		char fuda;
		cin >> N;
		if(N==0)break;
		for(int i=0;i<N;++i){
			a[i]=0;
		}
		while(1){
			for(int i=0;i<N;++i){
				cin >> fuda;
				counter+=1;
				switch(fuda){
				case 'M':
					a[i]+=1;
					break;
				case 'S':
					ba+=a[i]+1;
					a[i]=0;
					break;
				case 'L':
					a[i]+=ba+1;
					ba=0;
					break;
				}
				if(counter==100)break;
			}
			if(counter==100)break;
		}
		sort(a,a+N);
		for(int i=0;i<N;++i){
			cout << a[i] << " ";
		}
		cout << ba << endl;
	}
	return 0;
}