#C660. Alphabet Shift

    ID: 50378 Type: Default 1000ms 256MiB

Alphabet Shift

Alphabet Shift

You are given a string s consisting of lowercase English letters and an integer n. Your task is to shift every character in the string s by n positions forward in the alphabet. Note that the alphabet wraps around, so after 'z' comes 'a'.

The new character for each letter ch is determined by the formula:

$$ new\_char = ((ord(ch) - ord('a') + n) \mod 26) + ord('a') $$

For example, shifting 'a' by 2 positions results in 'c' and shifting 'z' by 1 position wraps around to 'a'.

inputFormat

The input is read from standard input (stdin). It consists of two values:

  1. A string s containing only lowercase letters.
  2. An integer n on the same line or the next line which denotes the number of positions to shift each character.

The values are separated by whitespace or newline.

outputFormat

The output should be written to standard output (stdout). It is a single string after shifting each character by n positions in the alphabet.

## sample
abc
2
cde