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