Given a string, say S, print it in reverse manner eliminating the repeated characters and spaces.
The first line contains T denoting the number of testcases. T testcases follow. Each case contains a string containing spaces and characters.
For each test case, output a single line containing the reversed String with repeated characters eliminated.
1 <= T <= 100
1 <= Length of String <= 100000
GEEKS FOR GEEKS
I AM AWESOME
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.