#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main(){
	char str[101];
	int n, temp;
	while (1){
		scanf("%d", &n);
		if (n == 0) break;
		scanf("%s", str);
		int p[10] = {0}, ba = 0;
		for (int i = 0; i < 100; i++){
			if (str[i] == 'M'){
				p[i%n] += 1;
			}else if (str[i] == 'S'){
				ba = ba + p[i%n] + 1;
				p[i%n] = 0;
			}else if (str[i] == 'L'){
				p[i%n] = ba + p[i%n] + 1;
				ba = 0;
			}
		}
		sort(p, p + n);
		for (int i = 0; i < n; i++){
			printf("%d ", p[i]);
		}
		printf("%d\n", ba);
	}
	return 0;
}