/* string */
#include<cstdio>
#include<iostream>
#include<string>
using namespace std;
string a,ans;
void solve(){
    string date;
    for(int i = 0; i < a.size();){
        int cnt = 0;
        date = a[i];
        for(int j = i;; j++){
            if(date[0] == a[j]){
                cnt++;
            }
            else break;
        }
        if(cnt >= 10)ans+=cnt/10+48;
        i += cnt;
        ans += cnt%10+48;
        ans += date[0];
    }
}
int main(){
    while(1){
        int n;
        scanf("%d",&n);
        if(n == 0) break;
        getchar();
        cin >> a;
        for(int i = 0; i < n; i++){
            solve();
            a = ans;
            ans = "";
        }
        cout << a << endl;
    }

    return 0;
}