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