#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
	int N;
	while (cin >> N, N) {
		vector<int> data(N, 0);

		int ba = 0;
		int turn = 0;
		string str; cin >> str;
		for (int t = 0; t < str.size(); ++t) {
			switch (str[t]) {
				case 'M': // テ」ツつェテ」ツδ暗」ツつウ
					++data[turn];
					break;

				case 'S': // テ・ツ敖甘、ツクツサ
					++data[turn];
					ba += data[turn];
					data[turn] = 0;
					break;

				case 'L': // テ・ツァツォ
					++data[turn];
					data[turn] += ba; ba = 0;
					break;
			}
			turn = (turn + 1) % N;
		}

		sort( data.begin(), data.end() );
		for (int i = 0; i < data.size(); ++i) {
			cout << data[i] << " ";
		}
		cout << ba << endl;
	}
}