A substring of a string is a successive part of the string. Given a string your task is to find out the K-th alphabet order substring of the original string. For example, the string "ABC" contains six substrings: "A" "AB" "ABC" "B" "BC" "C" (in alphabet order) and string "BBC" also contains six substrings: "B" "B" "BB" "BBC" "BC" "C" (in alphabet order)
输入解释
The input contains several test cases, the first line of input contains the number of test cases. For each test case, there is only one line contains the string S of length N, followed by a integer K. (1 <= K <= N*(N+1)/2, 1 <= N <= 100000, S contains only letters and digits)
输出解释
For each test cases, output the K-th alphabet order substring.