#include <iostream>
#include <string>
using namespace std;
int main()
{
int convTable[26]={10,11,12,13,14,15,16,17,34,18,19,20,21,22,35,23,24,25,26,27,28,29,32,30,31,33},identity_card_value_sum=0;
string input;
cin>>input;
for(int i=0;i<input.length()-1;i++){
identity_card_value_sum+=(int(input[i])-48)*(8-i);
}
for(int i=0;i<26;i++){
if((identity_card_value_sum+int(convTable[i]/10)+convTable[i]%10*9)%10==10-(input[input.length()-1]-48)){
cout<<char(i+65);
}
}
return 0;
}