Kevin has a string S that consists of lowercase English letters. Also he can perform the following operation in one minute:
- Choose some \(L,R\) such that \(1 \le L \le R \le length(S), L \ne 1 \space \) or \(\space R \ne length(S)\) and remove substring \([L, R]\) from S. It means that string \(S=S_1 S_2 \dots S_{length(S)}\) becomes \(S_1 S_2 \dots S_{L-1} S_{R+1} \dots S_{length(S)}\).
Kevin has at most K minutes to perform this operations. He decides that the string is super if it is the lexicographically smallest among all possible strings that he can get. Your task is to help Kevin and find this lexicographically smallest string.
Input format:
The first line of input will contain an integer T, denoting the number of test cases.
Each test case starts with 2 numbers N and K - length of S and the number of minutes Kevin has. Next line contains string S.
Output format:
For every test case output lexicographically smallest string that Kevin can get.
Constraints:
- \(1 \le T \le 10\)
- \(1 \le N, K \le 1000\)
Kevin get string "eow" after the first operation and "e" after the second.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor