12029 - Caesar salad 2   

Description

You, the businessman, received a message from Caesar for salad.

You opened the letter, and quickly found that the message was encrypted. Feeling confused, you asked the guy who gave you the letter. That guy told you 1. the message was encrypted using Caesar cipher, and 2. the corresponding number for shifting is N

As a smart businessman, could you figure out what did Caesar wanted to tell you?

The encrypt rule is as follow:

For each English character inside his letter, shift it with a fixed number N  in positive/negative direction.

For example,

  • N = 2, then "IJK" will become "KLM"
  • N = 3, then "IJK" will become "LMN"
  • N = -2, then "AJK" will become "YHI"
    • We do the shifting in a cyclic manner, that is, perform left shift 1 on "A" will become "Z"; right shift 2 on "Y" will become "A"​​

 The decrypt rule is as follow:

Input

Input consists of three UPPERCASE English characters representing the encrypted message, and an integer Nseperated by a whitespace character.

It is guaranteed that -2147483648 <= N <= 0.

Output

Print out the decrypted message in a single line. 

You need to print "\n" at the end of the answer.

Sample Input  Download

Sample Output  Download

Tags




Discuss