#include "cstdio"
#include "strings.h"
#include "string"
#include "string.h"

using namespace std;

int main() {
    char buf[201];
    while (scanf("%s", buf) != EOF) {
        if (0 == strcmp(buf, "ENDOFINPUT")) {
            break;
        }
        if (0 == strcmp(buf, "START")) {
            int x = getchar();
            fgets(buf, sizeof buf, stdin);
            string str = buf;
              str.pop_back();
            for (int i = 0; i < str.length(); ++i) {
                if (str[i] >= 'F' && str[i] <= 'Z') {
                    str[i] = str[i] - 5;
                } else if (str[i] <= 'E' && str[i] >= 'A') {
                    str[i] = str[i] + 21;
                }
            }
            printf("%s", str.c_str());
        }
        fgets(buf, sizeof buf, stdin);
        if (0 == strcmp(buf, "END")) {
            continue;
        }
    }
    return 0;
}