N,D=map(int,input().split()) n="A"*(2*N-D)+"B"*(D-N) if N