#include <iostream>
#include <string>
using namespace std;
string nations[7] = {"ENGLISH", "SPANISH", "GERMAN", "FRENCH", "ITALIAN", "RUSSIAN", "UNKNOWN"};
string greets[6] = {"HELLO", "HOLA", "HALLO" , "BONJOUR" , "CIAO", "ZDRAVSTVUJTE"};
int main()
{
string s;
int k = 0;
while(cin >> s)
{
if(s[0] == '#')
break;
int i = 0;
for(; i < 6; i++)
{
if(s.compare(greets[i]) == 0)
break;
}
cout << "Case " << ++k << ": " << nations[i] << '\n';
}
return 0;
}