#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

void solve()
{
	int n;
	while(cin >> n, n)
	{
		string str;
		cin >> str;
		vector<int> point(n);
		int field = 0;
		int pos = 0;
		for(int i = 0; i < str.size(); ++i)
		{
			if(str[i] == 'S')
			{
				field += point[pos] + 1;
				point[pos] = 0;
			}
			else if(str[i] == 'L')
			{
				point[pos] += field + 1;
				field = 0;
			}
			else if(str[i] == 'M')
			{
				++point[pos];
			}
			pos = (pos + 1) % n;
		}
		sort(point.begin(), point.end());
		for(int i = 0; i < n; ++i)
		{
			cout << point[i] << " ";
		}
		cout << field << endl;
	}
}

int main()
{
	solve();
	return(0);
}