#define _CRT_SECURE_NO_WARNINGS #include <stdio.h>
#include <string.h>
int main()
{
char head[15];
char message[150];
char tail[15];
int i = 0;
for (;;)
{
gets(head);
if (strcmp(head, "START") == 0){
gets(message);
for (i = 0; message[i] != '\0'; i++){
if (message[i] >= 'F' && message[i] <= 'Z'){
message[i] = message[i] - 5;
}
else if (message[i] >= 'A' && message[i] <= 'E'){
message[i] = message[i] + 21;
}
}
gets(tail);
if (strcmp(tail, "END") == 0 ){
printf("%s\n", message);
}
}
else if (strcmp(head, "ENDOFINPUT") == 0)
break;
}
return 0;
}