import sys sys.setrecursionlimit(10**6) N,K=map(int,input().split()) t=list(input()) S=set() def dfs(s,t): global S if len(t)==0: S.add(tuple(s)) return if len(t)>=2 and t[1]=="0":dfs(s+[int("".join(t[:2]))],t[2:]) else:dfs(s+[int(t[0])],t[1:]) if int("".join(t[:2]))<=26:dfs(s+[int("".join(t[:2]))],t[2:]) dfs([],t) S=sorted(S) ans=[] for c in S[K-1]: ans.append(chr(ord("a")+c-1)) print("".join(ans))