#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int N;
string ss;
string x()
{
	string ans;
	int X;
	string y;
	int Z=0;
	while(Z<ss.length()){
		string r;
		X=1;
		y=ss[Z];
		while(Z<ss.length()-1&&ss[Z]==ss[Z+1]){
			X++;
			Z++;
		}
		while(X>0){
			r+=(X%10+'0');
			X/=10;
		}
		for(int i=0;i<r.length();i++)ans+=r[r.length()-1-i];
		ans+=y;
		Z++;
	}
	return ans;
}
int main()
{
	while(true){
		scanf("%d",&N);
		if(N==0)break;
		cin >> ss;
		for(int i=0;i<N;i++){
			ss=x();
		}
		cout << ss << "\n";
	}
	return 0;
}