function main(input) {
  const N = parseInt(input.split(" ")[0], 10);
  if(N<=999){
    console.log("ABC");
  }else{
    console.log("ABD");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));