#include <stdio.h>
#include <string.h>
int main(void)
{
    char input[100];
    int cnt = 0;
    while (scanf("%s", input) != EOF) {
        if (strcmp(input, "#") == 0)
            break;
        printf("Case %d: ", ++cnt);
        if (strcmp(input, "HELLO") == 0)
            puts("ENGLISH");
        else if (strcmp(input, "HOLA") == 0)
            puts("SPANISH");
        else if (strcmp(input, "HALLO") == 0)
            puts("GERMAN");
        else if (strcmp(input, "BONJOUR") == 0)
            puts("FRENCH");
        else if (strcmp(input, "CIAO") == 0)
            puts("ITALIAN");
        else if (strcmp(input, "ZDRAVSTVUJTE") == 0)
            puts("RUSSIAN");
        else
            puts("UNKNOWN");
    }
    return 0;
}
