from sys import stdin

import fractions



n = int(stdin.readline().rstrip())



if n <1000:

    print("ABC")



else:

    print("ABD")
n = int(eval(input()))

if n < 1000:

    print("ABC")

else:

    print("ABD")
from sys import stdin
import fractions

n = int(stdin.readline().rstrip())
if n < 1000:
    print("ABC")
else:
    print("ABD")

n = int(eval(input()))
if n < 1000:
    print("ABC")
else:
    print("ABD")

-from sys import stdin -import fractions - -n = int(stdin.readline().rstrip()) +n = int(eval(input()))