using namespace std;
int main() {
//1
char n;
while (cin >> n)
{
if (n >= 'a'&&n <= 'z') {
cout << "lower";
}
else if (n >= 'A'&&n <= 'Z')
{
cout << "upper";
}
else if (n == ' ')
{
cout << "space";
}
else if (n >= '0'&&n <= '9')
{
cout << "digit";
}
else
{
cout << "other";
}
}
}