n,d = map(int, input().split()) s='A'*(n - abs(n-d)) h=n-d if h>0: s += 'C'*h else: s += 'B'*abs(h) print(s)