#include <bits/stdc++.h>
using namespace std;

int n;
string str;
int have[10], field;

int main()
{
	while (cin >> n, n){
		cin >> str;
		memset(have, 0, sizeof(have));
		field = 0;
		
		for (int i = 0; i < str.size(); i++){
			int p = i % n;
			if (str[i] == 'M') have[p]++;
			else if (str[i] == 'S'){
				field += 1 + have[p];
				have[p] = 0;
			}
			else {
				have[p] += 1 + field;
				field = 0;
			}
		}
		
		sort(have, have + n);
		for (int i = 0; i < n; i++){
			printf("%d ", have[i]);
		}
		printf("%d\n", field);
	}
}