function Main(input) {
  input = input.trim()
// input = input.split(" ").map(Number);
if(input<=999){
  console.log("ABC"+input)
}else{
  var a= input-999
  a +=""
  
  console.log("ABD"+('000' + a).slice(-3))
}
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));