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 X of N strings. A list P is a permutation of X when P holds exactly the same elements as X, possibly in a different order. He builds every permutation of X. For each permutation P he concatenates the strings of P from front to back into a single string, and he gathers all of those strings into a list Y. Finally he sorts Y lexicographically according to the ASCII table and deletes duplicate strings. The passwords are the strings at predetermined positions of that cleaned-up Y.
Given the list X and a position K, print the K-th password in Y. Positions are counted from 1.
The first line contains an integer T, the number of test cases.
Each test case starts with the size N (N≤20) of the list X and the position K, followed by N strings. Each string is at most 10 characters long, and all N strings have the same length. The strings contain no whitespace and consist only of upper and lower case letters. K is always a valid position.
For each test case, print the K-th password on its own line.