def solution(number, k):
answer = ""
stack = []
for i in number:
while stack and stack[-1] < i and k > 0:
k -= 1
stack.pop()
stack.append(i)
while stack and k > 0:
stack.pop()
k -= 1
for i in stack:
answer += i
return answer
number = "4321"
k = 1
print(solution(number, k))