#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
using namespace std;

string next(string s){
	int it=s[0]-'0';
	int count=1;
	string ans="";
	for(int i=1;i<s.size();i++){
		if(it==s[i]-'0')count++;
		else{
			char tmp[256];
			sprintf(tmp,"%d",count);
			string t=string(tmp);
			ans += t;
			sprintf(tmp,"%d",it);
			t=string(tmp);
			ans += t;
			it=s[i]-'0';
			count=1;
		}
	}
	char tmp[256];
	sprintf(tmp,"%d",count);
	string t=string(tmp);
	ans += t;
	sprintf(tmp,"%d",it);
	t=string(tmp);
	ans += t;
	return ans;
}
int main(){
	int n;
	while(cin>>n&&n){
		string s;
		cin>>s;
		for(int i=0;i<n;i++)s=next(s);
		cout<<s<<endl;
	}
	return 0;
}