(function(){
  'use strict';
  process.stdin.resume();
  process.stdin.setEncoding('utf8');

  process.stdin.on('data', function (chunk) {
    var line = chunk.toString().split('\n');
    if( parseInt(line) < 1000 ){
        console.log('ABC');
    }else if( 1000 < parseInt(line) && parseInt(line) < 2000){
      console.log('ABD');
    }
  });
})();
