# https://yukicoder.me/problems/no/3291 from collections import deque MAX_VALUE = float("inf") def main(): N, K = map(int ,input().split()) T = input() words = {str(i):(chr(i - 1+ ord("a"))) for i in range(1, 26 + 1)} dp = [0] * (N + 1) dp[N] = 1 for i in reversed(range(N)): for j in range(2): if i + j + 1<= N: t = T[i:(i + j + 1)] if t in words: if dp[i] + dp[i + j + 1] <= 2 * K: dp[i] += dp[i + j + 1] else: dp[i] = MAX_VALUE answer = [] index = 0 while index < N: for j in range(2): if index + j + 1 <= N: a = T[index:(index + j + 1)] if a in words: if dp[index + 1 + j] >= K: answer.append(words[a]) index += 1 + j break else: K -= dp[index + 1 + j] print("".join(answer)) if __name__ == "__main__": main()