#C1296. Decoding Caesar Cipher
Decoding Caesar Cipher
Decoding Caesar Cipher
You are given an encoded message that was encrypted with a Caesar cipher. In this encryption scheme, each letter in the message is shifted backward by a fixed integer value. Your task is to decode the message by reversing the shift.
For each letter, the decoded character is computed using the formula: $$\text{decoded letter} = ((\text{encoded letter} - 'A' - K) \mod 26) + 'A'$$, where K is the shift value.
If the shifting goes beyond 'A', it wraps around to 'Z'.
inputFormat
The first line of input contains an integer T, representing the number of test cases.
Each of the next T lines contains a string S and an integer K separated by a space. S is the encoded message comprising only uppercase English letters, and K is the shift value used in the cipher.
outputFormat
For each test case, output the decoded message on a new line.
## sample2
ZYXWV 5
HELLO 3
UTSRQ
EBIIL
</p>