Digo is popular among girls after his success in ACM. He has got a lot of girls lined up for him and he is confused in choosing any one of them.As he has full opportunity of dating anyone of them he wants to date everyone starting from the lightest girl to the fattest one.Help digo arrange girls for him so that he could date all of them as per their weights.
t number of test cases followed by t lines each having a number n representing the total girls in a particular test case followed by girls with their weight in the format [girlnameweight] where weight is represented by w.Girl name is a string containing small letters only.
Your output should contain t parts each having n girls name arranged in the desired order.
two adjacent cases should be separated by a line.