
async function main(){
    const n = await input();
    const ans = (parseInt(n) <= 999) ? 'ABC' : 'ABD';
    console.log(ans);
}

function input(){
    const readline = require('readline')
    const rl = readline.createInterface({
        input: process.stdin,
        output: process.stdout
    });
    return new Promise((resolve, reject) => {
        rl.on('line', (line) => {
            resolve(line);
            rl.close();
        })
    })
}

main()