Decades have passed since the beginning of AtCoder Beginner Contest.
The contests are labeled as ABC001, ABC002, ... from the first round, but after the 999-th round ABC999, a problem occurred: how the future rounds should be labeled?
In the end, the labels for the rounds from the 1000-th to the 1998-th are decided: ABD001, ABD002, ..., ABD999.
You are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

-----Constraints-----
 - 1 \leq N \leq 1998
 - N is an integer.

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.

-----Sample Input-----
999

-----Sample Output-----
ABC

The 999-th round of AtCoder Beginner Contest is labeled as ABC999.

Difficulty: introductory

Starter code:

Solutions:
a='ABD'
if int(input())<1000:a='ABC'
print(a)

n=int(input())
if n>999:
    print("ABD")
else:
    print("ABC")

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

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

N = int(input())
if 1 <= N <= 999:
    print('ABC')
elif 1000 <= N <= 1998:
    print('ABD')


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

N = int(input())

if N < 1000:
    print("ABC")
else:
    print("ABD")



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

n = int(input())

if n > 0 and n < 1000:
    print('ABC')
elif n >= 1000 and n <= 1998:
    print('ABD')

N = int(input())

if N <= 999:
    print('ABC')
elif N >999:
    print('ABD')


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

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

n=int(input())

if n<=999:
    print("ABC")

else:
    print("ABD")

N = int(input())

if 1 <= N <= 999:
    print('ABC')
else:
    print('ABD')

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

n = int(input())

if n < 1000:
    ans = 'ABC'
else:
    ans = 'ABD'

print(ans)

N = int (input ())

if N <= 999:
    print ("ABC")

else:
    print ("ABD")

n=int(input())

if n<=999:
    print("ABC")
else:
    print("ABD")

print((['ABC','ABD'][len(input())  > 3]))


print(["ABC","ABD"][int(input())//1000])

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

N = int(input())

if N < 1000:
    print("ABC")
else:
    print("ABD")

n=int(input())
print('ABC' if n<1000 else 'ABD')

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

number = int(input())

answer = ''
if number < 1000:
    answer = 'ABC'
else:
    answer = 'ABD'

print(answer)

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

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

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

N = int(input())

if N >= 1999: # 不等号は=の手前に
    print('The contest has not been held')

elif N < 1000:
    print('ABC')

elif N >= 1000:
    print('ABD')


a = int(input())
if a < 1000:
  print('ABC')
else:
  print('ABD')

import sys
import math

#https://atcoder.jp/contests/agc008/submissions/15248942
sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N = ini()

if N <= 999:
    print("ABC")
else:
    print("ABD")

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


N = int(input())
if N >= 1000:
    print("ABD")
else:
    print("ABC")

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

n = int(input())

if n <= 999:
  print('ABC')
elif n <= 1998:
  print('ABD')

N=int(input())

if N<=999:
  print('ABC')
else:
  print('ABD')

N = int(input())

if N <= 999:
    print("ABC")
elif N <= 1998:
    print("ABD")

n = int(input())


if n<=999 :
    c = 'ABC'
else :
    c = 'ABD'

print(c)


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


main()

X = int(input())

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

n=int(input())

if n<=999:
    ans="ABC"
else:
    ans="ABD"
print(ans)

# 入力
N = int(input())

# 処理&出力
if N < 1000:
    print('ABC')
elif 1000 <= N <= 1998:
    print('ABD')
else:
    print('IDK')


moji = int(input())
print(("ABC","ABD")[moji >=1000])

N = int(input())

if 1 <= N < 1000:
    print('ABC')
else:
    print('ABD')

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


n = int(input())
if 1 <= n and n <= 999:
  print("ABC")
else:
  print("ABD")

N = int(input())

if N <= 999 :
    print('ABC')

else:
    print('ABD')

N = int(input())

if N < 1000:
    print("ABC")
else:
    print("ABD")

contest_num = int(input())

if contest_num >= 1999:
    result_str = 'The contest has not been held'

elif contest_num < 1000:
    result_str = 'ABC'

elif contest_num >= 1000:
    result_str = 'ABD'

print(result_str)



n = int(input())
if n <= 999:
    print('ABC')
else:
    print('ABD')

N = int (input())

if N < 1000:
    print('ABC')
elif N >= 1000:
    print('ABD')

n = int(input())

if n >= 1000:
    print('ABD')
else:
    print('ABC')


N=int(input())

if N<=999:
  print("ABC")
else:
  print("ABD")




N = int(input(""))
if N <= 999:
    print("ABC")
elif 1000 <= N <= 1998:
    print("ABD")
else:
    print("error")


# 1000回目から1998回目のコンテストを順に ABD001,ABD002,...,ABD999

N = int(input())

if N < 1000:
    print('ABC')

else :
    print('ABD')

N = int(input())

print('ABC') if N < 1000 else print('ABD')

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

# A - ABD

N = int(input())

if 1 <= N < 1000:
    print('ABC')
elif 1000<= N < 1999:
    print('ABD')
elif N <= 0 or 1999 <= N:
    print('Out of range')

N = int(input())
if N <= 999:
    print('ABC')
else:
    print('ABD')



n=int(input())

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

N = int(input())

if N < 1000:
    print("ABC")
else:
    print("ABD")

N = int(input())
if N <= 999:
    print('ABC')
else:
    print('ABD')

N = int(input())

if N < 1000:
    print('ABC')

else :
    print('ABD')

contest_N = int(input())

if contest_N >= 1000:
    print('ABD')
else:
    print('ABC')

N = int(input())
S = 'ABC'
if 1000 <= N <= 1998:
    S = 'ABD'

print(S)

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


N = int(input())

if N < 1000:
    print("ABC")
else:
    print("ABD")

n = int(input())
if 1 <= n and n <= 999:
    print('ABC')
else:
    print('ABD')

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

n = int(input())
if n > 999:
  print("ABD")
else:
  print("ABC")

# N回目のコンテストの名前の最初の３文字を出力

N = int ( input ( ) )

if 1 <= N <= 999:
    print("ABC")
elif 1000 <= N <= 1998:
    print("ABD")
else:
    print("入力ミス")

N = int(input())

if N < 1000:
    print("ABC")
if N > 999:
    print("ABD")

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

N = input()
x = int(N)

if x > 0 and x < 1000:
    answer = 'ABC'
elif x >= 1000 and x <= 1998:
    answer = 'ABD'

print(answer)

N = int(input())
if 1 <= N <= 999:
    print("ABC")
elif 1000 <= N <= 1998:
    print("ABD")

n=int(input())
x=n-999 if n>999 else n
if n>999:
    print("ABD")
else:
    print("ABC")

n = int(input())

if n <= 999:
    print("ABC")
elif n > 999:
    print("ABD")

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

# ABD
# AtCoder Beginner Contestが始まってから早数十年。
# コンテストは1回目から順に ABC001,ABC002,...,と名付けられてきましたが、 999回目のコンテスト ABC999 を終え、
# これからのコンテストの名前をどうするかという問題が生じました。
# そこで、1000回目から1998回目のコンテストを順に ABD001,ABD002,...,ABD999 と名付けることとなりました。
# 1以上1998以下の整数Nが与えられるので、N回目のコンテストの名前の最初の3文字を出力してください。

# 1 < N < 1998
# Nは整数

N = int(input())

# N回目のコンテストの最初の三文字を出力せよ。

if 1<= N <= 999:
    print("ABC")
elif 1000 <= N <= 1998:
    print("ABD")

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

#099A

#1.入力をちゃんと受け取ること
x=input()
i=int(x)
#2.結果を出力する

if i<1000 :
    print('ABC')
elif i<=1998:
    print('ABD')

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

a = int(input())
if a >= 1000:
  print("ABD")
else:
  print("ABC")




N = int(input())

if N <= 999:
    print('ABC')
else:
    print('ABD')

# 1 <= N <= 1998
N = int(input())

if N <= 999:
    print("ABC")
elif 1000 <= N <=1998:
    print("ABD")


n = int(input())
if n <= 999:
    print('ABC')
else:
    print('ABD')

N = int(input())

if N >= 1000:
    print("ABD")
if N < 1000:
    print("ABC")


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

n=int(input())
if n>=1000:
  print('ABD')
else:
  print('ABC')

N = int(input())

if N <= 999:
    print('ABC')
else:
    print('ABD')


# 099A

# N回目(数値）：標準入力
N = int(input())

# 1~999回目：ABC001~ABC999
# 1000~1998回目：ABD001~ABD999
# N回目のコンテストの名前の最初の3文字を出力

if N < 1000:
    print('ABC')
elif 1000 <= N <= 1998:
    print('ABD')

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

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

integer = int(input())

if integer <= 999:
    print('ABC')
else:
    print('ABD')

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

n = int(input())
if len(str(n)) == 4:
    print("ABD")
else:
    print("ABC")

N = contest_numer =int(input())
if contest_numer > 999 and 1998 >= contest_numer:
    print("ABD")

elif contest_numer > 0 and 999 >= contest_numer:
    print("ABC")

else:
    print("contest that you inputted now has not been held")

N = input()
x = int(N)

if x > 0 and x < 1000:
    answer = 'ABC'
elif x >= 1000 and x <= 1998:
    answer = 'ABD'

print(answer)

N = int(input())

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