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

int main(){

  int n;
  int d[100];
  string s;

  while(cin >> n, n){
    cin >> s;

    memset(d,0,sizeof(d));

    for(int i=0;i<s.size();i++){
      if(s[i] == 'M') d[i%n]++;
      if(s[i] == 'S') d[n] += d[i%n]+1, d[i%n] = 0;
      if(s[i] == 'L') d[i%n] += d[n]+1, d[n] = 0;
    }

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

  }
}