from itertools import product N = int(input()) S = int(input()) X = ['A', 'B', 'C'] cnt = 0 for v in product(X, repeat=N): if 'A' in v and 'B' in v and 'C' in v: cnt += 1 if cnt == S: print(''.join(v)) exit() print(-1)