406331: GYM102365 A Abnormal Words
Description
"Khoor!" David exclaimed to Aram.
"Jreeohghbjrrn!" Aram responded.
Dismayed to find that club members weren't sufficiently confused, Aram and David decided to speak in a new language. Rather invent one from scratch, they decided to encode their speech with a Caesar cipher.
Specifically, they agree on the Caesar shift $$$s$$$. To say a word, they replace each of its letters by the letter that comes $$$s$$$ places later in the alphabet. Letters that pass z wrap back around to a. For example if $$$s=4$$$, a becomes e, b becomes f, and y becomes c.
Encoding and decoding words in their heads is very slow, so David and Aram asked you to write a program to automate this process. After all, they're still untangling their tongues after saying jreeohghbjrrn!
InputThe first line contains a single character, either "E" or "D", indicating whether Aram and David are requesting a word to encode or decode, respectively.
The second line contains a integer $$$s$$$ ($$$1 \le s \le 25$$$), the shift.
The third line contains a single word $$$w$$$ ($$$1 \le |w| \le 100$$$) consisting solely of the lowercase Latin letters from a to z.
OutputOn a single line output the encrypted or decrypted word, as requested.
ExamplesInputE 3 helloOutput
khoorInput
D 3 jreeohghbjrrnOutput
gobbledeygook