You are given a string $s$ consisting of $n$ lowercase Latin letters. Polycarp wants to remove exactly $k$ characters ($k \le n$) from the string $s$. Polycarp uses the following algorithm $k$ times:

  if there is at least one letter 'a', remove the leftmost occurrence and stop the algorithm, otherwise go to next item;  if there is at least one letter 'b', remove the leftmost occurrence and stop the algorithm, otherwise go to next item;  ...  remove the leftmost occurrence of the letter 'z' and stop the algorithm. 

This algorithm removes a single letter from the string. Polycarp performs this algorithm exactly $k$ times, thus removing exactly $k$ characters.

Help Polycarp find the resulting string.


-----Input-----

The first line of input contains two integers $n$ and $k$ ($1 \le k \le n \le 4 \cdot 10^5$) — the length of the string and the number of letters Polycarp will remove.

The second line contains the string $s$ consisting of $n$ lowercase Latin letters.


-----Output-----

Print the string that will be obtained from $s$ after Polycarp removes exactly $k$ letters using the above algorithm $k$ times.

If the resulting string is empty, print nothing. It is allowed to print nothing or an empty line (line break).


-----Examples-----
Input
15 3
cccaabababaccbc

Output
cccbbabaccbc

Input
15 9
cccaabababaccbc

Output
cccccc

Input
1 1
u

Output

Difficulty: introductory

Starter code:

Solutions:
from collections import Counter, defaultdict
from string import ascii_lowercase as al

n, k = list(map(int, input().split()))
s = list(input())

C = defaultdict(int, Counter(s))
C_ = defaultdict(int)

k_ = k
for char in al:
    temp = min(C[char], k_)

    C_[char] += temp
    k_ -= temp

for i, el in enumerate(s):
    if C_[el] > 0:
        s[i] = ''
        C_[el] -= 1

print(''.join(s))


n,k = map(int,input().split())
s = input()
dic = dict()
for item in s:
    if item not in dic:
        dic[item]=1
    else: dic[item]+=1
alphabet = "abcdefghijklmnopqrstuvwxyz"
en = ''

for item in alphabet:
    if item not in dic: continue
    if dic[item]<=k: k-=dic[item]
    else: 
        en = item
        break
ans = ""

for item in s:
    if item>en:
        ans+=item
    elif item==en and k==0: 
        ans+=item
    elif item==en and k>0: k-=1
    
if en=="": print()
else: print(ans)

n,k=map(int,input().split())
a={'a':0,'b':0,'c':0,'d':0,'e':0,'f':0,'g':0,'h':0,'i':0,'j':0,'k':0,'l':0,'m':0,'n':0,'o':0,'p':0,'q':0,'r':0,'s':0,'t':0,'u':0,'v':0,'w':0,'x':0,'y':0,'z':0}
b={'a':0,'b':0,'c':0,'d':0,'e':0,'f':0,'g':0,'h':0,'i':0,'j':0,'k':0,'l':0,'m':0,'n':0,'o':0,'p':0,'q':0,'r':0,'s':0,'t':0,'u':0,'v':0,'w':0,'x':0,'y':0,'z':0}
s=input()
for i in s:
    a[i]+=1
for i in a:
    if a[i]<k:
        b[i]=a[i]
    else:
        b[i]=k
        break
    k-=a[i]
for i in s:
    if b[i]:
        b[i]-=1
    else:
        print(i,end='')


def main():
	[n, k] = map(int, input().split())
	s = input()

	char_idxs = []
	for idx, c in enumerate(s):
		char_idxs.append((c, idx))

	char_idxs.sort()

	char_idxs = char_idxs[k:]

	char_idxs.sort(key=lambda cidx: cidx[1]) 

	lst = [c for c, idx in char_idxs]

	print("".join(lst))

main()

n, k = [int(i) for i in input().split()]
s = [0 for i in range(26)]
t = ''
for i in input():
    t += i
    s[ord(i) - 97] += 1
kar = 0
kol = 0
for i in range(len(s)):
    if k > s[i]:
        kar += 1
        k -= s[i]
    else:
        kol = k
        break
ans = ''
for i in range(n):
    if ord(t[i]) - 97 == kar and kol > 0:
        kol -= 1
    elif ord(t[i]) - 97 == kar:
        ans += t[i]
    if ord(t[i]) - 97 > kar:
        ans += t[i]
print(ans)

import string
from collections import Counter

n, k = [int(i) for i in input().split()]
s = input()

counter = Counter(s)

for char in string.ascii_lowercase:
    delta = min(k, counter[char])
    k -= delta
    counter[char] -= delta

s2 = ''
for char in s[::-1]:
    if counter[char] > 0:
        s2 += char
        counter[char] -= 1

print(s2[::-1])


import re
import math
import decimal
import bisect

def read():
	return input().strip()

def iread():
	return int(input().strip())

def viread():
	return list(map(int, input().strip().split()))

# code goes here
from collections import Counter
n, k = viread()
s = read()
letters = Counter(s)
# print(letters)
for l in sorted(letters.keys()):
	# print(letters[l], l + "'s")
	if letters[l] < k:
		s = re.sub(l, "", s)
		k -= letters[l]
		# print(s)
	else:
		news = ""
		hits = 0
		for c in s:
			# print("looking at", c)
			# print("hits is", hits)
			if c == l:
				hits += 1
				# print("hit!")
			if c != l or hits > k:
				news += c
				# print(news)
		s = news
		break

print(s)


from collections import Counter as cc
n, k = list(map(int, input().split()))
s = input()
c = cc(s)
alpha = 'abcdefghijklmnopqrstuvwxyz'
for a in alpha:
    if k > c[a]:
        k -= c[a]
        c[a] = 0
    else:
        c[a] -= k
        k = 0
    if k == 0:
        break
lst = []
for a in s[::-1]:
    if c[a] > 0:
        c[a] -= 1
        lst.append(a)
print("".join(lst[::-1]))


n, k = map(int, input().split())
string = list(input())
test = []

if n != k:
    test = [(i, c) for i, c in enumerate(string)]
    test.sort(key=lambda a: a[1])
    
    test = test[k:]
    test.sort(key=lambda a: a[0])
    
    print(''.join([v for _, v in test]))

t = input().strip()
t = [int(e) for e in t.split(" ")]
n = t[0]
k = t[1]

s = input()
assert len(s) == n

sum_l = [0 for i in range(26)]
for c in s:
    sum_l[ord(c) - ord('a')] += 1

need_l = [0 for i in range(26)]
for i in range(26):
    if k <= sum_l[i]:
        need_l[i] = k
        break
    else:
        need_l[i] = sum_l[i]
        k -= need_l[i]

result = []
for c in s:
    index = ord(c) - ord('a')
    if need_l[index] > 0:
        need_l[index] -= 1
    else:
        result.append(c)

print("".join(result))



(n, k) = map(int, input().split())

if k != n:
    s = input()

    d = {}
    for x in s:
        if not x in d:
            d[x] = 0
        d[x] += 1

    lst = sorted(d.keys())

    x = 0
    while x < len(lst):
        if d[lst[x]] > k:
            i = k
            b = lst[x]
            break
        else:
            k -= d[lst[x]]
            x += 1

    acc = 0
    for x in s:
        if x == b:
            acc += 1
            if acc > k:
                print(x, end='')
        elif x > b:
            print(x, end='')
    


#-*-coding:utf-8 -*-
from collections import defaultdict

n, m = map(int, input().split())
s = input()

mp = defaultdict(int)

for i in s:
    mp[i] += 1

cnt = defaultdict(int)

mk = 'abcdefghijklmnopqrstuvwxyz'

for i in mk:
    if mp[i] == 0:
        continue

    cnt[i] += min(m, mp[i])
    m -= min(m, mp[i])

    if m == 0:
        break

for i in s:
    if cnt[i] > 0:
        cnt[i] -= 1
    else:
        print(i, end='')









n,k = list(map(int, input().split() ) )
s=input()
alph=[chr(ord('a')+i) for i in range(26)]
for a in alph:
    if k==0:
        break
    if s.count(a)<=k:
        k-=s.count(a)
        s=s.replace(a,'')
    else:
        s=s.replace(a,'', k)
        k=0
print(s)

c = input().split(" ")
a = int(c[0])
b = int(c[1])
inp = input(str())
count = [0 for i in range(26)]
ind = []

for i in range(a):
	count[ord(inp[i])-ord('a')] += 1

running = 0
hit = -1
for i in range(26):
	running += count[i]
	if running >= b:
		hit = i
		break


rem = running - b
counter = 0

for i in range(a-1, -1, -1):
	if ord(inp[i])-ord('a') > hit:
		ind.append(i)
	elif ord(inp[i])-ord('a') == hit and counter < rem:
		counter += 1
		ind.append(i)
	else:
		pass

ind = reversed(ind)

ans = ""

for i in ind:
	ans += inp[i]

print(ans)


n,k=list(map(int,input().split()))
a=list(input().strip())
count=[0]*26
aaa=ord('a')
for i in a:
    count[ord(i)-aaa]+=1
deletables=-1
for i in range(26):
    if(count[i]>=k):
        count=k
        ele=i
        break
    deletables=i
    k-=count[i]
ans=""
for i in a:
    if(ord(i)-aaa<=deletables):
        continue
    if(chr(ele+aaa)==i):
        if(count>0):
            count-=1
        else:
            ans+=i
    else:
        ans+=i
print(ans)

n,k=list(map(int,input().split()))
s=list(input())
cnt={}
d={}
for i,c in enumerate(s):
    if c not in cnt:
        cnt[c]=1
        d[c]=[i]
    else:
        cnt[c]+=1
        d[c].append(i)
ch=''

for c in sorted(cnt):
    if k-cnt[c]<=0:
        ch=c
        break
    for i in d[c]:
        s[i]=''
    k-=cnt[c]
for i in d[ch][:k]:
    s[i]=''
print(''.join(s))


n,k=list(map(int,input().split()))
s=input()
i=ord('a')
while 1:
    km=s.count(chr(i))
    if k-km>0:
        k-=km
        i+=1
    else: break
ss=''
for j in range(n):
    if ord(s[j])>i: ss+=s[j]
    elif ord(s[j])==i:
        if k>0: k-=1
        else: ss+=s[j]
print(ss)
    

'''
////////////////      //////        ///////      //             ///////     //  //   //
////          //    ///   ///     ///    ///     //            ///  ///     ////     //
////    ////       ///     ///   ///      ///    //           /////////     ////     ///////
////     /////    ///       /// ///        ///   //          ///    ///     ////     //   //
//////////////     ///////////   ///////////     //////     ///     ///     //  //   //   //
'''



tn,tk=input().split()
n=int(tn)
k=int(tk)
a=input()
vis=[]
t=[]
for i in range(n):
    t.append((a[i],i))
t.sort()
for i in range(n):
    vis.append(0)
for i in range(k):
    vis[t[i][1]]=1
for i in range(n):
    if vis[i]:continue
    print(a[i],end="")


import math;
import random;
import time;
import heapq;
def getIntList():
    return list(map(int, input().split()));
def getTransIntList(n):
    first=getIntList();
    m=len(first);
    result=[[0]*n for _ in range(m)];
    for i in range(m):
        result[i][0]=first[i];
    for j in range(1, n):
        curr=getIntList();
        for i in range(m):
            result[i][j]=curr[i];
    return result;
n, k =getIntList();
s=input();
d=dict();
for l in s:
    d[l]=d.get(l,0)+1;
ordA=ord('a');
ordZ=ord('z');
trLeter='';
count=0;
for i in range(ordA, ordZ+1):
    l=chr(i);
    x=min(d.get(l, 0), k);
    if x==k:
        trLeter=l;
        count=x;
        break;
    k-=x;
ordTr=ord(trLeter);
result='';
for l in s:
    ordL=ord(l);
    if ordL>=ordTr:
        if ordL==ordTr:
            count-=1;
        if ordL==ordTr and count>=0:
            continue;
        result+=l;
print(result);

n,k=map(int,input().split())
s = input().rstrip()
for i in range(ord('a'),ord('z')+1):
  if k <= 0:
    break
  if s.count(chr(i)) < k:
    k -= s.count(chr(i))
    s = s.replace(chr(i),'')
  else:
    s = s.replace(chr(i),'',k)
    k = 0
print(s)

A = [int(i) for i in input().split()]
n = A[0]
k = A[1]
S = input()
A = {}
for i in range(26):
    A[chr(97+i)] = []
for i in range(len(S)):
    A[S[i]].append(i)
for i in range(26):
    A[chr(97+i)] = A[chr(97+i)][::-1]

rem = set()
for i in range(26):
    while len(A[chr(97+i)])>0 and k>0:
        rem.add(A[chr(97+i)].pop())
        k = k-1
        if k == 0:
            break



R = ""
for i in range(len(S)):
    if i not in rem:
        R += S[i]
print(R)


n,k=list(map(int,input().strip().split()))
r=input()
r1="abcdefghijklmnopqrstuvwxyz"
l=[[] for i in range(26)]
d={}
for u1 in range(26):
	d[r1[u1]]=u1
for t in range(n):
	l[d[r[t]]].append(t)
l1=[]
for x in l:
	for y in x:
		l1.append(y)
s=""
l2=[]
for o in range(k,n):
	l2.append(l1[o])
l2.sort()
for i in l2:
	s=s+r[i]
print (s)


n,k = map(int,input().split())
s = input()
alth = "abcdefghijklmnopqrstuvwxyz"
chars = [0]*26
chars2 = [0]*26
for i in range(n):
    chars[alth.find(s[i])] += 1
for i in range(26):
    if k <= 0:
        break
    chars2[i] = min(chars[i],k)
    k -= chars[i]
    
for i in range(n):
    if chars2[alth.find(s[i])] == 0:
        print(s[i],end="")
    else:
        chars2[alth.find(s[i])] -= 1


n,k=list(map(int,input().split()))
a=str(input())
if n!=k:
    b=[]

    for i in range(n):
        b.append([ord(a[i]),i])

    b.sort()

    b=b[k:].copy()

    #print(b)
    a=['']*n
    for i in b:
        a[i[1]]=chr(i[0])




    fini=''.join(a)
    print(fini)
else:
    print()


n, k = [int(i) for i in input().split()]
s = list(input())
l = len(s)
d = {}
f = [True] * l
for i in range(l):
	if not s[i] in d:
		d[s[i]] = []
	d[s[i]].append(i)

rule = []
for i in range(26):
	wk1 = chr(i + 97)
	if wk1 in d:
		rule.append(wk1)
		
current = 0
position = 0
for i in range(k):
	f[d[rule[current]][position]] = False
	position += 1
	if position == len(d[rule[current]]):
		position = 0
		current += 1
	if current == len(rule):
		break

for i in range(l):
	if f[i]:
		print(s[i], end = "")
print()