#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
int main()
{
	string s1;
	while (getline(cin,s1))
	{
		if (s1 == "START")
		{
			string code;
			getline(cin, code);
			for (int i = 0; i < code.size(); i++)
			{
				if (code[i] < 'F' && code[i] >= 'A')
				{
					code[i] = code[i] + 21;
				}
				else if (code[i] <= 'Z' && code[i] >= 'F')
				{
					code[i] = code[i] - 5;
				}
				else
				{
					code[i] = code[i];
				}
			}
			cout << code<<endl;
		}
		else if (s1 == "ENDOFINPUT")
		{
			return 0;
		}
	
	}
}