#include <iostream>
#include <vector>
#include <string>
#include <sstream>
using namespace std;

string oparate_string(int n,string s) {
  for(int i=1;i<=n;i++) {
    stringstream ss;
    int len = s.length();
    int same = 1;
    for(int l=1;l<len;l++) {
      if(s[l-1] == s[l]) {
        same++;
      }
      else {
        ss << same << s[l-1];
        same = 1;
      }
    }
    ss << same << s[len-1];
    s = ss.str();
  }
  return s;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  int n;
  string s;
  while(cin >> n && n!= 0) {
    cin >> s;
    cout << oparate_string(n,s) << endl;
  }
}