

The first line contains a single integer ‘T’ representing the number of test cases.
The first line of each test case will contain a string ‘S’.
For each test case, return the reversed string.
Output for every test case will be printed in a separate line.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 10
1 <= |S| <= 10^4
Time limit: 1 sec
The basic idea is to push the whole string into a stack (character by character) and then take off each character from the stack one by one. The steps are as follows: