#include<iostream>
#include<stdio.h>
#include<cstring>
using namespace std;
int main() {
char a[100];
int b = 1;
while (scanf("%s", &a) != EOF) {
if (strcmp(a, "#") == 0) return 0;
printf("Case %d: ", b);
if (strcmp(a, "HELLO") == 0) printf("ENGLISH");
else if (strcmp(a, "HALLO") == 0) printf("GERMAN");
else if (strcmp(a, "ZDRAVSTVUJTE") == 0) printf("RUSSIAN");
else if (strcmp(a, "BONJOUR") == 0) printf("FRENCH");
else if (strcmp(a, "CIAO") == 0) printf("ITALIAN");
else if (strcmp(a, "HOLA") == 0) printf("SPANISH");
else printf("UNKNOWN");
printf("\n");
b++;
}
}