An english word is given as input and it is modified using some format. Identify the format using the examples given below (examples given are sufficient to identify the format :-) ) and print the modified word as output.
STEWART is modified as EWARTSTAY, AMAR is modified as AMAR , MAN is modified as ANMAY etc.
Note: Input contains uppercase english words.
The first line contains an input T denoting the number of test cases.T test cases follows each of which contains a single line with the given word as input.
For each test case output a new line with the modified word as the output.
1 <=T <= 100
1 <= |string length| <= 105
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.