const main = input => {
  const N = parseInt(input.trim())
  if (N < 1000) {
    console.log('ABC')
  } else {
    console.log('ABD')
  }
}
// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
