#C9095. String Shift by 3 Positions
String Shift by 3 Positions
String Shift by 3 Positions
You are given a string S consisting only of uppercase English letters. Your task is to create a new string in which each character from S is replaced by the character that is three positions ahead in the alphabet. Note that the alphabet wraps around so that after 'Z' comes 'A'.
The transformation for each character ( c ) can be represented using the formula: [ \text{shift}(c) = \text{chr}((\text{ord}(c) - \text{ord}('A') + 3) \mod 26 + \text{ord}('A')) ]
For example, shifting "HELLO" will result in "KHOOR".
inputFormat
Input is read from stdin. It consists of a single line containing the string S with only uppercase English letters.
outputFormat
Output the transformed string to stdout after shifting each letter by three positions.## sample
HELLO
KHOOR