The customer database of a company includes the full name of each customer, consisting of a first name followed by a space and the family name. For correspondence, however, the company wants to print labels that only show the surname of the customer, followed by a space, the first letter of the first name and a period (.). Only capital letters can be printed on the labels . If, for example, the name

Eric Idle

occurs in the customer database, that name must be formatted as

IDLE E.

Input

The input consists of $$t$$ test cases ($$t \leq 10.000$$). The first line of the input contains a natural number $$t$$. This is followed by $$t$$ lines that describe the various test cases. Each test case consists of exactly one customer's name as it is pulled from the customer database of the company. You may assume that there are no spaces in the name and the surname of the customers.

Output

For each recipient's name in the format FAMILY NAME F..

Example

Input:

6
Graham Chapman
John Cleese
Terry Gilliam
Eric Idle
Terry Jones
Michael Palin

Output:

CHAPMAN G.
CLEESE J.
GILLIAM T.
IDLE E.
JONES T.
PALIN M.