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