Julius Caesar sent secret messages by shifting every letter forward by k places in the alphabet. After z, it wraps around to a.
With k = 3: a → d, x → a, z → c. Spaces stay as they are. Encode the message.
Input Format
The first line has the message (lowercase letters and spaces).
The second line has k.
Output Format
Print the encoded message.
Constraints
• 1 ≤ length ≤ 1000
• 0 ≤ k ≤ 1000
Examples
Example 1
Input
hello world
3
Output
khoor zruog
Explanation Each letter moves 3 steps: h → k, e → h, and so on.
Example 2
Explanation x → a, y → b, z → c (wrapping around).
Example 3
Explanation Shifting by 26 is a full circle, so no change.
Acceptance
—
Accepted
0
Submissions
0