{"raw_statement":[{"iden":"statement","content":"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:\n\n*   if there is at least one letter '_a_', remove the leftmost occurrence and stop the algorithm, otherwise go to next item;\n*   if there is at least one letter '_b_', remove the leftmost occurrence and stop the algorithm, otherwise go to next item;\n*   ...\n*   remove the leftmost occurrence of the letter '_z_' and stop the algorithm.\n\nThis algorithm removes a single letter from the string. Polycarp performs this algorithm exactly $k$ times, thus removing exactly $k$ characters.\n\nHelp Polycarp find the resulting string."},{"iden":"input","content":"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.\n\nThe second line contains the string $s$ consisting of $n$ lowercase Latin letters."},{"iden":"output","content":"Print the string that will be obtained from $s$ after Polycarp removes exactly $k$ letters using the above algorithm $k$ times.\n\nIf the resulting string is empty, print nothing. It is allowed to print nothing or an empty line (line break)."},{"iden":"examples","content":"Input\n\n15 3\ncccaabababaccbc\n\nOutput\n\ncccbbabaccbc\n\nInput\n\n15 9\ncccaabababaccbc\n\nOutput\n\ncccccc\n\nInput\n\n1 1\nu\n\nOutput"}],"translated_statement":"[{\"iden\":\"statement\",\"content\":\"你被给定一个由 $n$ 个小写拉丁字母组成的字符串 $s$。Polycarp 想要从字符串 $s$ 中恰好移除 $k$ 个字符（$k lt.eq n$）。Polycarp 使用以下算法重复 $k$ 次：\\n\\n该算法从字符串中移除一个字母。Polycarp 恰好执行此算法 $k$ 次，从而移除恰好 $k$ 个字符。\\n\\n帮助 Polycarp 找到最终得到的字符串。\\n\\n输入的第一行包含两个整数 $n$ 和 $k$（$1 lt.eq k lt.eq n lt.eq 4 dot.op 10^5$）——字符串的长度和 Polycarp 将移除的字母数量。\\n\\n第二行包含由 $n$ 个小写拉丁字母组成的字符串 $s$。\\n\\n请输出在 Polycarp 使用上述算法恰好移除 $k$ 个字母后得到的字符串。\\n\\n如果结果字符串为空，请不要输出任何内容。允许不输出任何内容或仅输出一个空行（换行符）。\"},{\"iden\":\"input\",\"content\":\"输入的第一行包含两个整数 $n$ 和 $k$（$1 lt.eq k lt.eq n lt.eq 4 dot.op 10^5$）——字符串的长度和 Polycarp 将移除的字母数量。第二行包含由 $n$ 个小写拉丁字母组成的字符串 $s$。\"},{\"iden\":\"output\",\"content\":\"请输出在 Polycarp 使用上述算法恰好移除 $k$ 个字母后得到的字符串。如果结果字符串为空，请不要输出任何内容。允许不输出任何内容或仅输出一个空行（换行符）。\"},{\"iden\":\"examples\",\"content\":\"输入1\\n15 3\\ncccaabababaccbc\\n输出1\\ncccbbabaccbc\\n\\n输入2\\n15 9\\ncccaabababaccbc\\n输出2\\ncccccc\\n\\n输入3\\n1 1\\nu\\n输出3\\n\"}}]","sample_group":[],"show_order":[],"formal_statement":"Given a string $ s $ of length $ n $ and an integer $ k $ such that $ 1 \\leq k \\leq n \\leq 4 \\cdot 10^5 $, remove exactly $ k $ characters from $ s $ using the following greedy algorithm:  \n\nAt each of the $ k $ steps, remove the first character $ s[i] $ such that $ s[i] > s[i+1] $ (i.e., the first local maximum). If no such character exists, remove the last character.\n\nFormally, define the removal process as a sequence of $ k $ operations:\n\nLet $ s^{(0)} = s $, and for $ j = 1 $ to $ k $:  \n- Find the smallest index $ i \\in \\{0, 1, \\dots, |s^{(j-1)}| - 2\\} $ such that $ s^{(j-1)}[i] > s^{(j-1)}[i+1] $.  \n- If such an $ i $ exists, set $ s^{(j)} = s^{(j-1)}[0:i] + s^{(j-1)}[i+1:] $.  \n- Otherwise, set $ s^{(j)} = s^{(j-1)}[0:|s^{(j-1)}|-1] $.\n\nOutput $ s^{(k)} $.","simple_statement":null,"has_page_source":false}