By Michele Selivon, URI Brazil
Valentina is a very dedicated woman and she works late every day. To save her time, she writes down the items at the same time she remembers. She uses a mobile app for this task.
The problem is that the application does not delete duplicate items and as Valentina is distracted, she frequently notes the same item more than once and the list gets too long. You should improve the app used by Valentina. Make a code that excludes duplicate items from the shopping list and sorts them in alphabetical order.
The first input line contains an integer N (N < 100) that indicates the number of test cases that follows. Each shopping list consists of a single line that contains from 1 to 1000 items or words composed only of lowercase letters (from one up to 20 chars), without accents and separated by a space.
The output consist of N lines, each representing one of Valentina's shopping lists, with no items repeated and sorted in alphabetical order.
Input Sample | Output Sample |
2 |
biscuit juice orange steak |