#include <iostream>
using namespace std;

int f(const std::string &text) 
{
    if (text.size()>0 && std::isalpha(text[0]))
       return std::toupper(text[0])-'A'; 
    else return -1;    // or throw an exception 
}

int main() {
	cout << "A->" << f("A")<<endl; 
	cout << "B->" << f("B")<<endl; 
	cout << "c->" << f("c")<<endl; 
	cout << "1->" << f("1")<<endl; 
	cout << "empty ->" << f("")<<endl; 

	
	return 0;
}