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

using namespace std;

int main()
{
	int num;
	string sent, sub;

	while(cin >> num)
	{
		if(!num) break;
		cin >> sent;
		for(int i = 0; i < num; i++)
		{
			sub.clear();
			int cnt = 1;
			for(int j = 0; j < sent.size(); j++)
			{
				if(sent[j] == sent[j+1])
				{
					cnt++;
				}
				else
				{
					stringstream ss;
					ss << cnt;
					sub += ss.str();
					sub += sent[j];
					cnt = 1;
				}
			}
			sent = sub;
		}
		cout << sent << endl;
	}
}