n, d = map(int, input().split()) c = 'C' if n >= d else 'B' print('A' * min(d, n * 2 - d) + c * (n - min(d, n * 2 - d)))