#include<iostream>
#include
<string>
using namespace std;
int main()
{
string start,str,end;
while(cin>>start&&start!="ENDOFINPUT")
{
scanf(
"\n");
getline(cin,str);
for(int i=0;i<str.size();i++)
{
if(str[i]>='A'&&str[i]<='E')
cout
<<(char)(str[i]+21);
else if(str[i]>='F'&&str[i]<='Z')
cout
<<(char)(str[i]-5);
else cout<<str[i];
}
cout
<<endl;
cin
>>end;
}
return 0;
}