#K13016. Alphabet Shift
Alphabet Shift
Alphabet Shift
You are given a string consisting of lowercase English letters. Your task is to produce a new string where each character is shifted one position forward in the alphabet. If a character is z, it wraps around and becomes a. Formally, for each character \( c \) in the string, you should output a character \( c' \) such that: \[ c' = \begin{cases} 'a' & \text{if } c = 'z', \\ \text{chr}(\text{ord}(c)+1) & \text{otherwise.} \end{cases} \]
This is a simple string manipulation problem aiming to test basic character operations and understanding of ASCII values.
inputFormat
The input consists of a single line containing a non-empty string \( s \) of lowercase English letters.
Example:
abcdef
outputFormat
Output the transformed string after shifting every letter by one position in the alphabet. If the letter is \( 'z' \), it should be replaced with \( 'a' \).
Example:
bcdefg## sample
abcdef
bcdefg