def main(): N, K = map(int, input().split()) S = input() if K < 2: print(S) return s = list(S) flag = [None] * N for i in range(N - 1): for j in range(97, 123): try: idx = s[i:].index(chr(j)) + i if idx == i: break except: idx = -1 if idx > -1: s[i], s[idx] = s[idx], s[i] flag[i] = flag[idx] = 1 break if flag.count(1) == K: break print(*s, sep='') main()