#include #include #include #include #include #include #include using namespace std; using ll = long long; char toc(int a) { char now = 'a'; a--; now += a; return now; } int main() { int N;ll K;cin >> N >> K; string T;cin >> T; vector dp(N+3, 0); dp[N] = 1; dp[N+1] = 1; for (int i = N-1;i >= 0;i--) { //split by one pattern int a = T[i] - '0'; if (a != 0) dp[i] = min(K+2, dp[i+1]); //split by two pattern if (i+1 < N) { int b = T[i+1] - '0'; if (a != 0 and ((10*a)+b) <= 26) { dp[i] = min(K+2, dp[i] + dp[i+2]); } } } string ret = ""; int it = 0; while (it < N) { int a = T[it] - '0'; if (a != 0) { ll dp1 = dp[it+1]; if (dp1 >= K) { ret += toc(a); it++; continue; } K -= dp1; } int b = T[it+1] - '0'; int c = (10 * a) + b; ret += toc(c); it += 2; } cout << ret << endl; }