import std.stdio;
import std.algorithm;
import std.string;
import std.conv;
import std.array;

void main() {
	while (true) {
	int N = readln.chomp.to!int;
	if (N == 0) return;
	char[] c = cast(char[])readln;
	int[char] field;
	field['S'] = field['M'] = field['L'] = 0;
	int[char][] hands = new int[char][N];
	foreach (ref hand; hands) {
		hand['S'] = hand['M'] = hand['L'] = 0;
	}
	foreach (i; 0..100) {
		final switch (c[i]) {
		case 'M':
			hands[i % N][c[i]]++;
			break;
		case 'S':
			hands[i % N][c[i]]++;
			field['M'] += hands[i%N]['M'];
			field['S'] += hands[i%N]['S'];
			field['L'] += hands[i%N]['L'];
			hands[i%N]['M'] = 0;
			hands[i%N]['S'] = 0;
			hands[i%N]['L'] = 0;
			break;
		case 'L':
			hands[i % N][c[i]]++;
			hands[i%N]['M'] += field['M'];
			hands[i%N]['S'] += field['S'];
			hands[i%N]['L'] += field['L'];
			field['M'] = 0;
			field['S'] = 0;
			field['L'] = 0;
			break;
		}
	}
	int[] cards = new int[N];
	foreach (int i, h; hands) {
		foreach (k; h.keys) {
			cards[i] += h[k];
		}
	}
	cards.sort;
	foreach (card; cards) {
		write(to!string(card) ~ ' ');
	}
	writeln(field['S'] + field['M'] + field['L']);
	}
}