#include<stdio.h>
int main(void)
{
	int N,T,ba,Player[10];
	char c[101];
	while(1){
		ba = 0;
		for(int i=0;i<10;i++)
			Player[i] = 0;
		scanf("%d",&N);
		if(N == 0) break;
		scanf("%s",c);
		for(int i=0;i<100;i++){
			switch(c[i]){
			case 'S':
				Player[i%N]++;
				ba = ba + Player[i%N];
				Player[i%N] = 0;
				break;
			case 'M':
				Player[i%N]++;
				break;
			case 'L':
				Player[i%N]++;
				Player[i%N] = Player[i%N] + ba;
				ba = 0;
				break;
			}
		}
		for(int i=0;i<N-1;i++){
			for(int j=i;j<N;j++){
				if(Player[i] > Player[j]){
					T = Player[i];
					Player[i] = Player[j];
					Player[j] = T;
				}
			}
		}
		for(int i=0;i<N;i++)
			printf("%d ",Player[i]);
		printf("%d\n",ba);
	}
	return 0;
}