<reponame>Lucasfeli0162/neps-academy-exercises
P, R = [int(i) for i in input().split()]

if not P:
    print('C')
else:
    if R:
        print('A')
    else:
        print('B')
P, R = [int(i) for i in input().split()]

if not P:
    print('C')
else:
    if R:
        print('A')
    else:
        print('B')