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'.

SAMPLE INPUT
4
2
KOKUUW
4
ALEXCSYIEX
9
FQHJANHXDXOOURWN
1
XIPXBTTIF

SAMPLE OUTPUT
IMISSU
WHATYOUEAT
WHYAREYOUOFFLINE
WHOWASSHE
if __name__=='__main__':
    upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    T = int(raw_input())
    for i in range(0,T):
        key = int(raw_input())
        string = raw_input()
        lst = []
        for i in range(len(string)):
            #print(string[i])
            if string[i] in upper:
                if upper.index(string[i]) - key < 0:
                    lst.append(upper[(upper.index(string[i]) - key)%26])    
                else:
                    lst.append(upper[(upper.index(string[i])-key)])

        st = ''
        for i in lst:
            st += i

        print st