Love, encoded!

3.2

30 votes
Problem

There was girl named Julia in their neighbourhood. Both of them liked her and were trying to impress her. Now that Tim and Bob are done with daddy’s game. Julia thought that Tim solved the game on his own and was deeply impressed. After few days, Julia and Tim realised they fell in love with each other. They started talking in code words when someone is around them. Bob, who was feeling very disheartened that he didn’t get Julia tried to understand what are they talking about. He concluded with a pattern and decoded their conversation. He thinks each letter of their word is shifted by 2 places further through the alphabet (e.g. 'A' shifts to 'C', 'R' shifts to 'T', etc.). For example, "IMISSU" shifted by 2 places will be encoded as "KOKUUW". In other words, if given (quotes for clarity) "KOKUUW" and 2 as input, you will return "IMISSU". They can, of course, try shifting by any number. Given a coded text and a number of places to shift, decode it. Help Bob to decode Tim and Julia’s code word.

Input

First line contains T denoting number of test cases, Each test case consist of K denoting key, the number by which the letters are shifted. The next line contains the one code word of their conversation.

Output

The output contains the decoded word i.e. it stands for the original meaning of the word meant by them.

Constraints

1 ≤ T ≤ 10 Each code word has length between 0 to 50 characters inclusive. Each character of code word is an uppercase letter 'A'-'Z'.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?