There is a string of length containing lowercase letters and an integer . Among the letters those appear exactly times in string , pick the lexicographically maximum one. Now delete any (k-1) occurrences of this letter from the string in a way so that the resultant string is lexicographically smallest.
Note that if there is no letter which appears k times in s, no deletion takes place.
In this problem, you will have to determine what is the lexicographical smallest string after the deletions (possibly none)?
The first line of the input contains (), the number of lowercase letters in string and ().
The second line contains the string .
Print the lexicographically smallest string after the deletions (possibly none).
5 2 baabc