#K93147. Next Letter Transformation

    ID: 38355 Type: Default 1000ms 256MiB

Next Letter Transformation

Next Letter Transformation

Given a string s, transform it by replacing each alphabetical character with the next character in the English alphabet. For example, 'a' is replaced by 'b', 'z' by 'a', 'Z' by 'A' and so on. Characters which are not letters remain unchanged.

Note: The transformation is performed character by character. The wrapping behaviour can be described with the formula: \( f(c) = \begin{cases} 'a' & \text{if } c = 'z' \\ 'A' & \text{if } c = 'Z' \\ \text{chr}(\text{ord}(c)+1) & \text{if } c \text{ is an alphabet letter and } c \neq 'z' \text{ or } 'Z' \end{cases} \)

For example:

  • s = "a" transforms to "b".
  • s = "Zebra" transforms to "Afcsb".

inputFormat

The input is given via standard input (stdin) as a single line containing the string s. The string can include uppercase and lowercase letters, digits, and special characters.

outputFormat

Output the transformed string to standard output (stdout) based on the specified rules.

## sample
a
b