name-cutter-7
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

pooja works in a govt. office where she manages the database of different people who comes there to solve their queries , so simply what she do is , she stores the person information in his database , but due to programmer mistake the database software has got a simple error is that it cannot store a long name so pooja's  work is to short the name and store in her database.

Constraints

1<T ≤ 10
1<name ≤ 100

Input : 

First line of input contains the number of test cases(T). Next each of T lines contains a name(char string).

Output :

You have to print the single small case shorted name for each test case.

Note :
All name input will be in  small case.
use a blank space after every  . (dot)

SAMPLE INPUT
3
akhilesh kumar gupta
kumar
vicky sharma

SAMPLE OUTPUT
a. k. gupta
kumar
v. sharma

Explanation

Case 1 :
akhilesh kumar gupta  - a. k. gupta
here there are three words so we can short first two words.

Case 2  : 
kumar - kumar
here only single word name is given , so no need to short it.

Case 3 :
vicky sharma - v. sharma
here there are only two words so we can only short the first word.