main(require('fs').readFileSync('/dev/stdin', 'utf8').trim());

function main(chunk){
    var lines = chunk.split("\n");
    for(var i=0;i<lines.length-1;){
        var n = lines[i++];
        var ans = lines[i++];
        for(var j=0;j<n;j++){
            ans = calc(ans);
        }
        console.log(ans);
    }
}
function calc(line){
    var ans = "";
    var tmp=line[0],cnt=0;
    for(var i=0;i<line.length;i++){
        var c = line[i];
        if(c==tmp){
            cnt++;
        }else{
            ans += ""+cnt+tmp;
            tmp = c;
            cnt=1;
        }
    }
    ans += ""+cnt+tmp;
    return ans;
}