#include <stdio.h>
#include <string.h>
#include <algorithm>

using namespace std;

int main() {
    while (1) {
        int i;
        int n;
	int now = 0;
	int cards[10];
	int table = 0;

	memset(cards, '\x00', sizeof(cards));

        scanf("%d", &n);
        if (n == 0) return 0;

	for (i=0; i<100; i++) {
	    char c;

	    scanf(" %c", &c);

            if (c == 'S') {
                table += cards[now] + 1;
		cards[now] = 0;
	    } else if (c == 'M') {
		cards[now] += 1;
	    } else if (c == 'L') {
		cards[now] += table + 1;
		table = 0;
	    }

	    ++now;
	    now %= n;
	}

        sort(cards, cards + n);

	for (i=0; i<n; i++) {
	    printf("%d ", cards[i]);
	}

	printf("%d\n", table);
    }
}