#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0); cin.tie(0);
char x;
cin >> x;
if(isalpha(x))
cout << (tolower(x) - 'a' + 1) << "\n";
else if(isdigit(x))
cout << "digit\n";
else
cout << "weird symbol\n";
return 0;
}