Given a string, your task is to reverse the string keeping the spaces intact to their positions.
The first line of input contains an integer T denoting the number of test cases.Each test case consist of a string.
Print the reverse of the string while keeping the spaces intact to their positions.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.