function Main(input){
	input = input.split(' ');
    nums = 1000;
    if(input < nums){
    console.log("ABC");
    }else if(input > nums){
    console.log("ABD");
    }
}

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