Set of strings is given. Sort it according to their size. If the size of the strings are equal keep the original order of strings.
First line contains number of tests. Each next line contains set of strings. Each string has no more than 50 characters ('a' - 'z').
Print each set of strings in one line ordered by their length.