NAJD - Dictionary

Your task is to make a simple dictionary.

You will be given a paragraph. It is guaranteed that no punctuation symbol will be given in the input except dot "." and there will be only one space between words.

Input

The first line of input is a integer T representing the number of test cases (T ≤ 10). Each test case begins with a number N represents the number of lines of the paragraph in that test case. (1 ≤ N ≤ 10).

Then N lines there is a text S. (1 ≤ |S| ≤ 10000).

Output

Output each word found in the paragraph only once in a lexicographical order. There will be a blank line between two cases. See the sample for clarity.

Example

Input:
2
3
dhaka city college.
dhanmondi dhaka.
bangladesh.
2
argentina argentina argentina.
argentinaaaaaaaaa brazil.

Output:
Case #1:
bangladesh
city
college
dhaka
dhanmondi

Case #2:
argentina
argentinaaaaaaaaa
brazil

Added by:Najmuzzaman
Date:2014-10-25
Time limit:0.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2018-08-24 19:44:06
There are no blanklines between the cases in the input.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.