#include<iostream>
#include<algorithm>
using namespace std;

int main(){
  int n,a[110],b;
  string c;

  while(cin >> n,n){
    cin >> c; b = 0;
    for(int i=0;i<n;i++)a[i] = 0;

    for(int i=0;i<c.size();i++){
      int p = i%n;
      if(c[i] == 'M'){
	a[p]++;
      }else if(c[i] == 'S'){
	b += a[p]+1; a[p] = 0;
      }else{
	a[p] += b+1; b = 0;
      }
    }

    sort(a,a+n);
    for(int i=0;i<n;i++)cout << a[i] << " ";
    cout << b << endl;
  }
}