#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(ll i=0;i> N >> S; queue q; q.push("A"); q.push("B"); q.push("C"); while(1){ string s=q.front(); if((ll)s.size()==N) break; q.pop(); q.push(s+"A"); q.push(s+"B"); q.push(s+"C"); } ll d=0; while(!q.empty()){ string s=q.front(); q.pop(); ll a=0,b=0,c=0; REP(i,N){ if(s[i]=='A') a++; if(s[i]=='B') b++; if(s[i]=='C') c++; } if(a!=0 && b!=0 && c!=0) d++; if(d==S){ cout << s << endl; return 0; } } cout << -1 << endl; return 0; }