function Main(input){
    if (input >= 1 && input < 1000){
        console.log('ABC');
    }
    if(input >=1000 && input <= 1998){
        console.log('ABD');
    }
}
Main('17 6');
Main(require("fs").readFileSync("/dev/stdin", "utf8"));