  function main(input) {
    var n = parseInt(input, 10);
    var answer = 'ABC'

    if(n >= 1000) {
    	answer = 'ABD';
    }

    console.log(answer);

  }
  main(require('fs').readFileSync('/dev/stdin', 'utf8'));
