#include<stdio.h> #include<ctype.h> int judge(char c); main() { char c; while((c=getchar())!=EOF) printf("%d\n",judge(c)); } int judge(char c) { if(isalpha(c)) if(isupper(c)) return c-'A'+1; else return c-'a'+1; else return -1; }