N,D=map(int,input().split())

if N<=D:
    a=2*N-D
    b=D-N
    print("A"*a+"B"*b)
else:
    a=D
    c=N-D
    print("A"*a+"C"*c)