#include <iostream>
#include <algorithm>
using namespace std;

int main(){
	int N,field;
	int *player;
	char c[101];
	while(true){
		cin >> N;
		if(N == 0)
			break;
		player = new int[N];
		for(int i=0; i<N; i++)
			player[i] = 0;
		field = 0;
		cin >> c;
		for(int i=0; i<100; i++){
			if(c[i] == 'M'){
				player[i%N]++;
			}else if(c[i] == 'S'){
				field += player[i%N]+1;
				player[i%N] = 0;
			}else{
				player[i%N] += field+1;
				field = 0;
			}
		}
		sort(player, player+N);
		for(int i=0; i<N; i++)
			cout << player[i] << ' ';
		cout << field << endl;
		delete[] player;
	}
	return 0;
}