def assert f unless f puts "Error!: Constraint Violation" exit end end map = "abcdefghijklmnopqrstuvwxyz".chars cnt = 1 hash = {} map.each do |v| hash[v] = cnt hash[cnt] = v cnt += 1 end nums = "0123456789".chars nums_hash = {} nums.each do |v| nums_hash[v] = 1 end n,k = gets.split.map(&:to_i) assert(1 <= n && n <= 300000) assert(1 <= k && k <= 10**18) s = gets.chomp.chars s.each do |v| assert(nums_hash[v] == 1) end assert(n == s.length) s.map!{|v|v.to_i} # 数え上げ dp = Array.new(n+1, 0) dp[n] = 1 (n-1).downto(0) do |i| # 先頭が 0 を除く if s[i] != 0 # 一桁使う dp[i] += dp[i+1] # 二桁使う if i != n-1 x = s[i..i+1].join.to_i if hash[x] != nil dp[i] += dp[i+2] end end dp[i] = 10**18 if dp[i] > 10**18 end end assert(dp[0] >= k) # 復元 ans = [] i = 0 rest = k while i < n if dp[i+1] >= rest ans << hash[s[i]] i += 1 next end rest -= dp[i+1] if i+1 < n x = s[i..i+1].join.to_i if hash[x] != nil ans << hash[x] i += 2 end end end puts ans.join