Given a string s, display the alternate words in the reverse order.
The first line of input contains integer T denoting the number of test cases. For each test case, we input a string s.
For each test case, the output is a string displaying the words at even position in reverse order.
Geeks for geeks
Geeks rof geeks
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.