PUCMM332 - Julius Caesar Cipher

Julius Caesar used a system of cryptography, now known as Caesar Cipher, which shifted each letter 2 places further through the alphabet (e.g. 'A' shifts to 'C', 'R' shifts to 'T', etc.). At the end of the alphabet we wrap around, that is 'Y' shifts to 'A'.

We can, of course, try shifting by any number. Given an encoded text and a number of places to shift, decode it.

For example, "HELLOWORLD" shifted by 4 places will be encoded as "LIPPSASVPH". In other words, if given (quotes for clarity) "LIPPSASVPH" and 4 as input, you will print "HELLOWORLD".

Input

The first line is the number of test cases T (T ≤ 1,000). Then T test cases follow.

Each test case consists of a word and an integer, separted by a space, in a single line, denoting the word to decode and the shift, respectively.

Each character of the word is an uppercase letter from 'A' to 'Z' and the shift is between 0 and 25 inclusive.

The word has up to 1,000 characters.

Output

For each test case print the decoded word in a single line in the format given by the examples.

Example

Input:
2
LIPPSASVPH 4
DBNPCBQ 1

Output:
Test Case #1: HELLOWORLD
Test Case #2: CAMOBAP

Added by:Olson Ortiz
Date:2013-01-01
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C CSHARP C++ 4.3.2 CPP JAVA
Resource:Olimpiada de ProgramaciĆ³n PUCMM ACM-ISC 2013

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.