from collections import deque
def solution(number, k):
answer_leng = len(number)-k
number = list(number)
j = number.index(max(number[:k]))
k -= j
number = number[j:]
number = deque(number)
p = number.popleft()
num = p
while k and number:
p = number.popleft()
for i in range(len(num)):
if int(num[-1]) < int(p) and k:
num = num[:-1]
k -= 1
if num == '':
num += p
else:
num += p
break
## 지워야하는 갯수가 남았을 때
if k and len(number)==0:
num = num[:answer_leng]
elif number:
n = ''.join(number)
num += n
return num