Write a program that reads a string and prints its first letter followed by its last letter.
The first line contains the number of test cases T (1≤T≤10). Each of the next T lines contains one string. Every string consists only of the uppercase letters A to Z, contains no spaces, and has length less than 1000.
For each test case, print the first letter of the string immediately followed by its last letter, one test case per line. A string of length 1 has the same letter in both positions, so that letter is printed twice.