<reponame>KATO-Hiro/AtCoder
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
# Problem A


if __name__ == '__main__':
    n = int(input())

    if n < 1000:
        print('ABC')
    else:
        print('ABD')
