($n,$d)=glob<>; if($n<$d){ print 'A'x($n*2-$d),'B'x($d-$n) }else{ print 'A'x$d,'C'x($n-$d) }