#include <stdio.h>
int main ()
{
int a , b ,c ,x ;
while (scanf ("%d %d %d",&a,&b ,&c) == 3)
{
x = a+b ;
if (x>c && x==2)
{
if (c==1) printf ("*\n") ;
else printf ("C\n") ;
}
else if (x>c && x==1)
{
if (a==0) printf ("B\n") ;
else printf ("A\n") ;
}
else if (x==c)
{
if (c==0) printf ("*\n") ;
else
{
if (a==1) printf ("B\n") ;
else printf ("A\n") ;
}
}
else printf ("C\n") ;
}
return 0 ;
}
int main ()
{
int a , b ,c ,x ;
while (scanf ("%d %d %d",&a,&b ,&c) == 3)
{
x = a+b ;
if (x>c && x==2)
{
if (c==1) printf ("*\n") ;
else printf ("C\n") ;
}
else if (x>c && x==1)
{
if (a==0) printf ("B\n") ;
else printf ("A\n") ;
}
else if (x==c)
{
if (c==0) printf ("*\n") ;
else
{
if (a==1) printf ("B\n") ;
else printf ("A\n") ;
}
}
else printf ("C\n") ;
}
return 0 ;
}