Barney needs to encrypt his "Playbook" so Lily won't be able to read the playbook, he has found a method to encrypt every single letter in the playbook but it is going to be very time consuming so he needs you to write a program to encrypt his "Playbook". He has provided the following instructions for encryption
You have to use the english alphabets as in the keyboard of your pc
Consider the 3 lines of input as Set 1, Set 2 and Set 3
1. For the first letter return the 3rd letter counting right from it's position from the same set( i.e. if first letter is in Set 1 return letter from the same.)
2. For the second letter return the 2nd letter counting left from it's position from the next set ( i.e. if second letter is in Set 1 return letter from the Set 2.)
3. For the third letter return the 1st letter counting left from it's position from the previous set( i.e. if third letter is in Set 1 return letter from the Set 3)
4. for the fourth letter return the letter in the same position from the next set( i.e. if fourth letter is in Set 1 return letter from the Set 2)
repeat for the next letters considering the 5th as 1st and so on.
If the string contains a letter more than once do not encrypt every occurence, in place of it put '.' at the end of the encrypted text.
Input Format
First line contains an integer n, number of test cases followed by test cases.
Output Format
Encrypted text for each test case in separate line.
Its gonna be **legen** wait for it....
For legen, letter 'e' is repeated, so only legn is considered and 1 dot (.) will be added at the end of the result
1. l is the first letter so 3rd letter counting right from it position is returned from same set i.e. 'd'
2. e is the second letter so 2nd letter counting left from it position is returned from next set i.e. 'a' from Set 2
3. g is the third letter so 1st letter counting left from it position is returned from previous set i.e. 'r' from set 1 from
4. n is the fourth letter so same positioned letter is returned from next set i.e. 'y' from set 1
So legen got encrypted as dary. (with a dot at the end)