#include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int n;
	while (cin >> n, n) {
		int a[20] = {};
		int b = 0;
		char s[103]; cin >> s;
		for (int i = 0; i < 100; i++) {
			if (s[i] == 'M')a[i%n]++;
			else if (s[i] == 'S') {
				b += a[i%n] + 1;
				a[i%n] = 0;
			}
			else if (s[i] == 'L') {
				a[i%n] += 1 + b;
				b = 0;
			}
		}
		sort(a, a + n);
		for (int i = 0; i < n; i++)cout << a[i] << ' '; cout << b << endl;
	}
}