#include <cstdio>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

const int INF = (int)1e9;

void calc(int n){
  char c[101];
  int have[10]={0},ba=0;
  
  scanf("%s",c);

  for(int i=0;i<100;i++){
    if(c[i]=='M'){
      have[i%n]++;
    }else if(c[i]=='S'){
      ba += have[i%n] + 1;
      have[i%n] = 0;
    }else{
      have[i%n] += ba + 1;
      ba = 0;
    }
  }

  sort(have,have+n);

  for(int i=0;i<n;i++){
    cout << have[i] << " ";
  }
  cout << ba << endl;

  return;
}
  

int main(){
  int n;

  while(1){
    scanf("%d",&n);

    if(n==0) break;
    calc(n);
  }

  return 0;
}