#include<iostream>
#include<string>
#include<algorithm>
using namespace std;int main(){int n,k[10],b;char z;while(true){cin>>n;if(n==0)break;for(int i=0;i<n;i++)k[i]=0;b=0;for(int i=0;i<100;i++){cin>>z;if(z=='M')k[i%n]++;if(z=='S'){b+=k[i%n]+1;k[i%n]=0;}if(z=='L'){k[i%n]+=b+1;b=0;}}sort(k,k+n);for(int i=0;i<n;i++)cout<<k[i]<<" ";cout<<b<<endl;}return 0;}