function Main(str) {
    str=str.split(/\n/);
    if(Number(str[0])<1000){
        console.log('ABC');
    }else{
      console.log('ABD');   
    }
}
 Main(require("fs").readFileSync("/dev/stdin", "utf8"));