import std.stdio,
       std.string,
       std.conv;

void main() {
    int N;
    while(N = readln.chomp.to!int, N) {
        auto a = new int[](N+1);
        auto input = readln.chomp;
        int n = 0;
        foreach(c; input) {
            if(c == 'M')
                a[n+1]++;
            if(c == 'S') {
                a[0] += a[n+1] + 1;
                a[n+1] = 0;
            }
            if(c == 'L') {
                a[n+1] += a[0] + 1;
                a[0] = 0;
            }
            n++;
            n%=N;
        }

        auto b = a[1..$].sort;
        foreach(v; b)
            write(v, ' ');
        a[0].writeln;

    }
}