include

include

include

using namespace std;
int main(){
string str;
while(getline(cin,str)){//起始行
if(str=="ENDOFINPUT")
break;
getline(cin,str);//密文
for(int i=0;i<str.size();++i){
if(str[i]>='A'&&str[i]<='Z')
str[i]='A'+(21+str[i]-'A')%26;//对26循环取余
}
cout<<str<<endl;
getline(cin,str);//结束行
}
return 0;
}