#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();
            // printf("x=%d\n", x);
            fgets(buf, sizeof buf, stdin);
            string str = buf;
            // A65 Z90
            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;
}