English Words
Submissions: 553   Accuracy:

46.82%

  Difficulty: Easy   Marks: 2

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.

Input:
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.

Output:
For each test case output a new line with the modified word as the output.

Constraints:
1 <=T <= 100
1 <= |string length| <= 105

Example:
Input:

4
GEEK
CODING
THINKING
APTITUTE

Output:
EEKGAY
ODINGCAY
INKINGTHAY
APTITUTE

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: RIYA BHARDWAJ
Author: Riya Bhardwaj


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.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.