#K88617. Caesar Cipher Encryption

    ID: 37349 Type: Default 1000ms 256MiB

Caesar Cipher Encryption

Caesar Cipher Encryption

Given a string s and an integer k, implement a Caesar cipher encryption that shifts each alphabetical character by k positions. The encryption should leave non-alphabetical characters unchanged. For uppercase letters, the transformation is given by:

$$ E(c)= (c - 'A' + k) \mod 26 + 'A' $$

and for lowercase letters:

$$ E(c)= (c - 'a' + k) \mod 26 + 'a' $$

For example, if s is "HELLO WORLD!" and k is 3, the encrypted result will be "KHOOR ZRUOG!".

inputFormat

The input consists of two lines. The first line contains the string s (which may include spaces and punctuation). The second line contains the integer k which is the shift value for the Caesar cipher.

outputFormat

Output a single line containing the encrypted string after applying the Caesar cipher.

## sample
HELLO WORLD!
3
KHOOR ZRUOG!