n, k = map(int, input().split())
numbers = input()
arr = []
for number in numbers:
while arr and 0 < k:
if arr[-1] < number:
arr.pop()
k -= 1
else:
break
arr.append(number)
print("".join(arr))
biwgayA9IG1hcChpbnQsIGlucHV0KCkuc3BsaXQoKSkKbnVtYmVycyA9IGlucHV0KCkKCmFyciA9IFtdCmZvciBudW1iZXIgaW4gbnVtYmVyczoKICAgIHdoaWxlIGFyciBhbmQgMCA8IGs6CiAgICAgICAgaWYgYXJyWy0xXSA8IG51bWJlcjoKICAgICAgICAgICAgYXJyLnBvcCgpCiAgICAgICAgICAgIGsgLT0gMQogICAgICAgIGVsc2U6CiAgICAgICAgICAgIGJyZWFrCiAgICBhcnIuYXBwZW5kKG51bWJlcikKCnByaW50KCIiLmpvaW4oYXJyKSkK