#K38012. Caesar Cipher Decryption

    ID: 26104 Type: Default 1000ms 256MiB

Caesar Cipher Decryption

Caesar Cipher Decryption

You are given an encrypted string consisting of lowercase English letters and a positive integer shift value. The string has been encrypted using the Caesar cipher where each letter is shifted by a fixed number of positions in the alphabet. Your task is to decrypt the string by shifting each letter backwards by the given shift amount. Note that the alphabet wraps around, meaning after 'a' you go back to 'z'.

In mathematical terms, if a letter c (with 0-indexed position in the alphabet where a = 0, b = 1, ..., z = 25) is encrypted, its decrypted counterpart c' is computed as:

[ c' = (c - s) \mod 26 ]

where s is the shift amount. Your program should read the input from the standard input and print the decrypted string to the standard output.

inputFormat

The input consists of two lines:

  • The first line contains the encrypted string (only lowercase letters).
  • The second line contains a non-negative integer representing the shift.

outputFormat

Output the decrypted string on a single line to the standard output.

## sample
zab
2
xyz

</p>