Nitika was once reading a history book and wanted to analyze it. So she asked her brother to create a list of names of the various famous personalities in the book. Her brother gave Nitika the list. Nitika was furious when she saw the list. The names of the people were not properly formatted. She doesn't like this and would like to properly format it.
A name can have at most three parts: first name, middle name and last name. It will have at least one part. The last name is always present. The rules of formatting a name are very simple:

- Only the first letter of each part of the name should be capital.
- All the parts of the name except the last part should be represented by only two characters. The first character should be the first letter of the part and should be capitalized. The second character should be ".".

Let us look at some examples of formatting according to these rules:
- gandhi -> Gandhi

- mahatma gandhI -> M. Gandhi 
- Mohndas KaramChand ganDhi -> M. K. Gandhi 

-----Input-----
The first line of the input contains an integer T denoting the number of test cases.
The only line of each test case contains the space separated parts of the name.

-----Output-----
For each case, output the properly formatted name.

-----Constraints-----
- 1 ≤ T ≤ 100
- 2 ≤ Length of each part of the name ≤ 10
- Each part of the name contains the letters from lower and upper case English alphabets (i.e. from 'a' to 'z', or 'A' to 'Z')

-----Subtasks-----
Subtask #1 (40 points)
- There is exactly one part in the name.

Subtask #2 (60 points)
- Original constraints.

-----Example-----
Input:
3
gandhi
mahatma gandhI
Mohndas KaramChand gandhi

Output:
Gandhi 
M. Gandhi 
M. K. Gandhi 

-----Explanation-----
The examples are already explained in the problem statement.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'for i in range(int(input())):\n    l=list(input().split())\n    tot=""\n    if(len(l)==1):\n        for j in l:\n            print(j.capitalize())\n    elif len(l)==2:\n        j=l[0]\n        tot+=j[0].capitalize()+". "\n        tot+=l[1].capitalize()\n    elif len(l)==3:\n        j=l[0]\n        k=l[1]\n        tot+=j[0].capitalize()+". "\n        tot+=k[0].capitalize()+". "\n        tot+=l[2].capitalize()\n    print(tot)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13407