#include <bits/stdc++.h> using namespace std; int main() { int a,b; scanf("%d %d",&a,&b); vector<int> v1; vector<int> v2; v1.push_back(a); b--; while(b--) { v2.clear(); int count = 1; v2.push_back(v1[0]); for(int j=1;j<v1.size();j++) { if(v1[j] == v1[j-1]){ count++; }else{ v2.push_back(count); count=1; v2.push_back(v1[j]); } } v2.push_back(count); v1 = v2; } for(int i=0;i<v1.size();i++) { cout<<v1[i]; } cout<<endl; return 0; }