#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<algorithm>
#include<set>
#include<list>

using namespace std;


/*
//1
int main(){
	for(int i=0; i<7;i++){
		int a, b;
		cin >> a >> b;
		cout << a- b << endl;

	}

	return 0;
}
*/

/*
//2
int main(){
	int t[4] = {6000, 4000, 3000, 2000};
	for(int i=0; i<4; i++){
		int T,n;
		cin >> T >> n;
		T--;
		cout << t[T]*n << endl;
	}

	return 0;
}
*/

/*
//3
int main(){
	int N;
	cin >> N;
	for(int i=0; i<N; i++){
		int x, y, b, p;
		cin >> x >> y >> b >> p;
		
		if(b >= 5 && p >= 2){
			int ans = (b*x + p*y)*0.8;
			cout << ans << endl;
		}
		else if(b >= 5 && p < 2){
			int ans = (b*x + 2*y)*0.8;
			ans = min( b*x + p*y, ans );
			cout << ans << endl;
		}
		else if(b < 5 && p >= 2){
			int ans = (5*x + p*y)*0.8;
			ans = min( b*x + p*y, ans );
			cout << ans << endl;
		}
		else{
			int ans = (5*x + 2*y)*0.8;
			ans = min( b*x + p*y, ans );
			cout << ans << endl;
		}
	}

	return 0;
}
*/

/*
//4
int main(){
	while(true){
		int N;
		cin >> N;
		if(N == 0) break;
		int ans = 2;
		int num = N;
		bool b = false;
		for(int i=0; i<N; i++){
			int k;
			cin >> k;
			if(k == 0) num--;
			if(k >= 2) b = true;
		}
		if(b){
			cout << ans + num - 1 << endl;
		}
		else{
			cout << "NA" << endl;
		}
	}



	return 0;
}
*/


//5
int main(){
	while(true){
		int N;
		cin >> N;
		if(N == 0) break;
		string C;
		cin >> C;

		int card[100];
		for(int i=0; i<N; i++){
			card[i] = 0;
		}

		int now = 0;
		int ba = 0;
		for(int i=0; i<C.size(); i++){
			if(C[i] == 'M'){
				card[now]++;
			}
			if(C[i] == 'L'){
				card[now]++;
				card[now] += ba;
				ba = 0;
			}
			if(C[i] == 'S'){
				card[now]++;
				ba += card[now];
				card[now] = 0;
			}

			now++;
			if(now == N) now = 0;
		}
		sort(card, card+N);

		for(int i= 0; i<N; i++){
			cout << card[i] << " ";
		}

		cout << ba << endl;
	}


	return 0;
}


/*
//6
int main(){
	int Q;
	cin >> Q;
	for(int i=0; i<Q; i++){
		int c,a,n;
		cin >> c >> a >> n;
		int ans = 0;
		while(c != 0 && a != 0 && n != 0){
			c--;
			a--;
			n--;
			ans++;
		}
		while(c >= 2 && a >= 1){
			c -= 2;
			a--;
			ans++;
		}
		while(c >= 3){
			c -= 3;
			ans++;
		}
		cout << ans << endl;
	}

	return 0;
}
*/

/*
//7
int main(){
	int N,R,L;
	cin >> N >> R >> L;
	int s[100001];
	int ans[100001];
	list<int> lank;
	for(int i=1; i<=N; i++){
		s[i] = 0;
		ans[i] = 0;
		lank.push_back(i);
	}

	int last_top = 1;
	int last_time = 0;
	for(int i=0; i<R; i++){
		int d,t,x;
		cin >> d >> t >> x;
		ans[last_top] += t - last_time;
		s[d] += x;
		for(auto itr=lank.begin(); itr!=lank.end(); itr++){
			if(*itr == d){
				lank.erase(itr);
				break;
			}
		}
		for(auto itr=lank.begin(); itr!=lank.end(); itr++){
			if(s[d] > s[*itr] || (s[d] == s[*itr] && d < *itr)){
				lank.insert(itr, d);
				break;
			}
		}
		last_top = *lank.begin();
		last_time = t;
	}
	ans[last_top] += L - last_time;

	int answer = -1;
	int tmp = -1;
	for(int i=1; i<=N; i++){
		if(ans[i] > tmp){
			answer = i;
			tmp = ans[i];
		}
	}

	cout << answer << endl;

	return 0;
}
*/

/*
//8
int main(){


	return 0;
}
*/

/*
//9
int main(){


	return 0;
}
*/

/*
//10
int main(){


	return 0;
}
*/




Measured memory_bytes: 3192