Jack is awesome. His friends call him little Einstein. To test him, his friends gave him a string. They told him to add the string with its reverse string and follow these rules:
Input:
First line contains a value N denoting number of test cases. Next N lines contains string str.
Output:
For every string str output the string that Jack's friends wants from him.
Constraints
1 <= N <= 10
1 <= str <= 10^5