BETA

Difficulty Level: Basic

Submissions: 288 Accuracy:

50.35%

Front-Back Transformation
     

Given a string S, consisting only of english alphabets, replace all the alphabets with the alphabets occuring at the same position when counted in reverse order of alphabets. For example, 'a' would be replaced by 'z', 'b' by 'y', 'c' by 'x' and so on. Print the resulting string in a new line. Any capital letters would be replaced by capital letters only.

Input: 
First line of input is the number of test cases T. Each test case has only one line of input i.e. string S.

Output: 
For each test case, output the modified string in a new line.

Constraints:
1<= T <= 100
A<= S[ i ] <= Z  or  a<= S[ i ]<= z , where 0<= i < strlen(S)

Example:
Input:

1
Hello
Output:
Svool

Explainantion:

In the word Hello, 'H' is the 8th letter from the beginning of english alphabets, which is replaced by 'S' which comes at 8th position in reverse order of alphabets. Similarly, all other letters are replaced by their respective upper or lower case letters accordingly.

 

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

Contributor: Anushree_20

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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