var main = function(input) {
var N = parseInt(input);
  if(N < 1000){
    console.log('ABC');
  } else{
    console.log('ABD');
  }
    return 0; 
}

main(require("fs").readFileSync("/dev/stdin", "utf8").trim());