const fs = require("fs");

function Main(input){
    var a = parseInt(input);
    if(a <= 999){
        console.log("ABC");
    }else{
        console.log("ABD");
    }
}

Main(fs.readFileSync("/dev/stdin", "utf8"));