is sending a super special love letter, and because it is so special he doesn't want anyone (except his crush obviously) to see it.
To stop it from getting into the wrong hands, he has decided to encrypt the letter with a Caeser Cipher (don't worry his crush will get it).
Unfortunately, he isn't very skilled at programming and finds it difficult to apply the cipher to his letter. Can you help him do it?
Constraints
Input Specification
The first line will contain the integer , the length of the love letter.
The second line will contain the integer , the shift he wants to apply.
The third line will contain the string , the love letter itself. It will consist only of lowercase letters and spaces.
Output Specification
Output the love letter with the cipher applied.
Sample Input
56
2
roses are red violets are blue sugar is sweet so are you
Sample Output
tqugu ctg tgf xkqngvu ctg dnwg uwict ku uyggv uq ctg aqw
Explanation
Every letter in the input has been shifted two places forward as specified in the input. Note that the letter y
was looped back to a
.
Comments
I got IndexError on test case 12 for some reason even though I'm looping L times. Don't know why, but it worked when I looped used the len() function. (Function to find the length of the String).
Hopefully this helps anyone who gets stuck on test case 12!
That stumped me for a while! Got it eventually. Thanks for posting the problem :-)