Passwords

No attempts yetTime limit1sMemory limit128 MB

Problem

Ahmed administers the contest system and generated one login password per team, then lost the list of passwords. He still remembers how he built them.

Ahmed keeps a list XX of NN strings. A list PP is a permutation of XX when PP holds exactly the same elements as XX, possibly in a different order. He builds every permutation of XX. For each permutation PP he concatenates the strings of PP from front to back into a single string, and he gathers all of those strings into a list YY. Finally he sorts YY lexicographically according to the ASCII table and deletes duplicate strings. The passwords are the strings at predetermined positions of that cleaned-up YY.

Given the list XX and a position KK, print the KK-th password in YY. Positions are counted from 1.

Input

The first line contains an integer TT, the number of test cases.

Each test case starts with the size NN (N20N \le 20) of the list XX and the position KK, followed by NN strings. Each string is at most 10 characters long, and all NN strings have the same length. The strings contain no whitespace and consist only of upper and lower case letters. KK is always a valid position.

Output

For each test case, print the KK-th password on its own line.