Create  For Short

Have you ever been annoyed when someone uses incomprehensible abbreviations, such as AFAIK, ASAP, FYI, GTSY, IYKWIM, KIT, LOL, LTNS, PM, PS, SYS, TA, WB? Are you always trying hard to understand them? Now it is time for striking back!
Even more, you are going to shorten the whole sentences instead of phrases. For example, the previous sentence can be "EM,YAGTSTWSIOP." for short. Thus, you are able to shout proudly: "Ha-ha, can anyone understand me? Do not speak abbreviations to me anymore, or I will use these sentences against you!"
As a man of principle, you decide to apply these rules during sentences shortening:
A sentence is a line contains printable characters (From ASCII codes 32 to 126) only, including letters, digits, and punctuation marks and so on.
A word is a substring of sentence which only consists of letters, and any characters adjacent to the word are not letters.
A word is replaced by the uppercase of the beginning letter of it for short.
Other characters except spaces are remained. Spaces are deleted.
Now you are trying to rewrite these given sentences for short.
Input
The first line contains an integer T (1 ≤ T ≤ 20) -- the number of test cases.

Each test case contains a legal sentence in a single line. The length of a sentence is less than 1000 characters.
Output
For each test case, output only one line -- the corresponding "sentence" after shortened.
Sample Input
1
Even more, you are going to shorten the whole sentences instead of phrases.
Sample Output
EM,YAGTSTWSIOP.