A permutation is an ordered arrangement of objects. For example, is one possible permutation of the word . If all of the permutations are listed alphabetically, we call it lexicographic order. The lexicographic permutations of are:
What is the lexicographic permutation of the word ?
The first line contains an integer , i.e., number of test cases.
Next lines will contain an integer .