function Main(input){
  input=input.trim();
  const n = input.split(" ");
  if(n<1000){
    console.log("ABC");
  }else{
    console.log("ABD");       
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));