x,y=gets.split.map &:to_i g=(x-y).abs if x>=y puts ?A*(x-g)+?C*g else puts ?A*(x-g)+?B*g end