#K90207. Next Alphabet String
Next Alphabet String
Next Alphabet String
You are given a string consisting solely of lowercase English letters. Your task is to generate a new string where each character is replaced by the next character in the alphabetical order. If a character is 'z', it wraps around to 'a'.
For example, the string 'abc' becomes 'bcd' and the string 'xyz' becomes 'yza'.
The transformation for a character c can be represented using the following formula:
$$ c' = \text{chr}((\text{ord}(c)-\text{ord}('a')+1) \mod 26 + \text{ord}('a')) $$
If the input is empty, the output should also be an empty string.
inputFormat
The input is provided via standard input (stdin) and consists of a single line containing a string of lowercase English letters. The input does not contain spaces.
outputFormat
Print to standard output (stdout) the transformed string where each letter is replaced by its immediate successor in the alphabet, with 'z' wrapping around to 'a'.## sample
abc
bcd