Encryption
Here’s a scheme for encrypting a message. Let’s suppose the message consists of the characters c1c2c3 • • • , where each ci is a lower case letter. Now suppose our key is the letter ’b’. Assuming the letters are given the values a = 1, b = 2, • • • , z = 26, then to encrypt the first letter c1, simply add b (that is, 2) to the character c1 (with “wrap around” e.g. adding 2 to ‘z’ gives ‘b’) to get the first encrypted letter e1.
For the remaining letters we perform the same operation but replace the key letter (b, in our example) with ci−1. Thus, we get e2 by adding c1 to c2, and e3 by adding c2 to c3, and so on (all with “wrap around”, of course).
For example, if our key were b and our message were andawaywego, then the resulting encrypted message would be corexxzvblv.
You job is to recover the original message when given the encrypted message and the key.
INPUT (STDIN)
The first line of input will be an integer n (n < 200) indicating the number of test sets to follow. Each test set will consist of a single lower case letter, indicating the key, followed by a space, followed by a string of between 5 and 40 lower case letters, which is the encrypted message. There will be no other white space on the line.
OUTPUT (STDOUT)
Each test case should produce one line of output which is simply the original message. As is usual for encryption, print out the message in groups of 5 (except possibly for the last group) separated by single spaces. There should be no space at the very end of each line of output.
Sample Input
2
b corexxzvblv
n dhgvysnzvwupbeuok
Sample Output
andaw ayweg o
progr ammin gisli fe