BETA
This is a school problem. Successful submissions of this are not counted in user ratings.

Submissions : 2829 Accuracy :

43.02

Reverse digit
     

Write a program to reverse digits of a number.

Input:

The first line of input contains an integer T denoting the number of test cases.
The first line of each test case is N.

Output:

Print the reverse digit of a N digit number.

Constraints:

1 ≤ T ≤ 100
1 ≤ N ≤ 1000000000

Example:

Input:
2
200
122

Output:
2
221

 

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.