#include <iostream>
#include <string>
using namespace std;
int main() {
char user[100];
int counter=0;
cout<<"Enter Word : \n";
cin >> user;
cout<<"Enter move count: \n";
cin >>counter;
for(int i = 0 ; user[i] != '\0'; ){
if (user[i] >=65 && user[i] <=90){
user[i]=user[(i%91)+counter];
i++;
}
else if (user[i] >=97 && user[i] <=122){
user[i]=user[(i%123)+counter];
i++;
}
else {
i++;
}
}
std::cout << user << '\n';
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoKY2hhciB1c2VyWzEwMF07CmludCBjb3VudGVyPTA7CgoKCmNvdXQ8PCJFbnRlciBXb3JkIDogXG4iOwpjaW4gPj4gdXNlcjsKCmNvdXQ8PCJFbnRlciBtb3ZlIGNvdW50OiBcbiI7CmNpbiA+PmNvdW50ZXI7CgoKCmZvcihpbnQgaSA9IDAgOyB1c2VyW2ldICE9ICdcMCc7ICl7CgogICAgaWYgKHVzZXJbaV0gPj02NSAmJiB1c2VyW2ldIDw9OTApewoKICAgICAgICB1c2VyW2ldPXVzZXJbKGklOTEpK2NvdW50ZXJdOwogICAgICAgIGkrKzsKCiAgICAgICAgfQogICAgZWxzZSBpZiAodXNlcltpXSA+PTk3ICYmIHVzZXJbaV0gPD0xMjIpewoKICAgICAgICB1c2VyW2ldPXVzZXJbKGklMTIzKStjb3VudGVyXTsKICAgICAgICBpKys7CgogICAgfQogICAgZWxzZSB7CiAgICAgICAgaSsrOwogICAgfQp9CnN0ZDo6Y291dCA8PCB1c2VyIDw8ICdcbic7CnJldHVybiAwOwp9Cgo=