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

int main()
{
	int n;

	cin >> n;

	while (n != 0) {
		vector<int> p(n, 0);
		char c[101];

		cin >> c;

		int b = 0;

		for (int i = 0; i < 100; i++) {
			if (c[i] == 'M')
				p[i % n]++;
			else if (c[i] == 'L') {
				p[i % n] += b + 1;
				b = 0;
			}
			else if (c[i] == 'S') {
				b += p[i % n] + 1;
				p[i % n] = 0;
			}
		}

		sort(p.begin(), p.end());

		for (vector<int>::iterator itr = p.begin(); itr != p.end(); itr++)
			cout << *itr << " ";

		cout << b << endl;

		cin >> n;
	}

	return 0;
}

