N, D=map(int, raw_input().split()) if N>D: print 'A'*D + 'C'*(N-D) else: print 'A'*(2*N-D) + 'B'*(D-N)