#B4003. Encryption Shift

    ID: 11660 Type: Default 1000ms 256MiB

Encryption Shift

Encryption Shift

This problem is about implementing an encryption technology using a shift cipher. In this cipher, every uppercase letter is shifted by a fixed number of positions forward in the alphabet, treating the alphabet as circular. For example, when the shift is $3$, the letter A becomes D, and the letter Z becomes C. In general, the uppercase alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ is mapped to DEFGHIJKLMNOPQRSTUVWXYZABC when the shift is $3$.

Note: If the shift value is a multiple of 26, then each uppercase letter remains unchanged.

inputFormat

The input consists of two lines:

  1. The first line contains an integer representing the shift value.
  2. The second line contains a string to be encrypted. Only uppercase letters (A-Z) should be shifted; all other characters remain unchanged.

outputFormat

Output a single line containing the encrypted string after shifting each uppercase letter by the given shift amount.

sample

3
HELLO WORLD
KHOOR ZRUOG