N=int(input()) S=int(input()) import sys sys.setrecursionlimit(10**7) def dfs(s): global A if len(s)==N: if "A" in s and "B" in s and "C" in s: A.append(s) return for c in ("A","B","C"): dfs(s+c) A=[] dfs("") if S<=len(A): print(A[S-1]) else: print(-1)