N = int(input()) if N == 1: print("B") elif N <= 8: print("A") else: if N % 2 == 1: print("B") else: print("A")