def max(a,b); (a <=> b) >= 0 ? a : b; end N, D = gets.split.map(&:to_i) ans = (0 .. N).inject([-1,-1,-1]) do |s, b| a = D - 2 * b c = N - D + b if a >= 0 && b >= 0 && c >= 0 max(s,[a,b,c]) else s end end puts 'A' * ans[0] + 'B' * ans[1] + 'C' * ans[2]