function Main (input) {
  const inputs = input.split(/\s/g).map((num) => parseInt(num))[0];
  if (inputs <= 999) return console.log('%s', 'ABC');
  if (inputs <= 1998) return console.log('%s', 'ABD');
}

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