print("ABC") if int(input())<=999 else print("ABD")

if int(eval(input()))<1000:

  print("ABC")

else:

  print("ABD")
print("ABC") if int(input()) <= 999 else print("ABD")

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

-print("ABC") if int(input()) <= 999 else print("ABD") +if int(eval(input())) < 1000: +    print("ABC") +else: +    print("ABD")