AtCoder Beginner Contest 099 - ABD

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: EASY

Starter code:

Solutions:
s = input()
print('ABC' if len(s) <= 3 else 'ABD')


S = input()
if len(S) < 4:
	print('ABC')
else:
	print('ABD')


s = input()
print('ABC') if len(s) < 4 else print('ABD')


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


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


n = input()
print('ABD' if len(n) >= 4 else 'ABC')


print('AABBCD'[len(input()) > 3::2])


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


print('AB' + 'CD'[int(input()) > 999])


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


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


N = int(input())
print('AB' + ['C', 'D'][N >= 1000])


n = int(input())
print('ABC' if len(str(n)) <= 3 else 'ABD')


print(['ABC', 'ABD'][int(input()) > 999])


print('AB' + 'DC'[len(input()) < 4])


print('AABBCD'[int(input()) > 999::2])


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


print(format(11255808 + int(input(), 16), 'x').upper()[:3])


print(('ABD', 'ABC')[not input()[3:]])


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


print(['ABC', 'ABD'][len(input()) == 4])


print('ABD' if len(str(input())) == 4 else 'ABC')


print('ABC' if len(input().strip()) <= 3 else 'ABD')


print('AB' + ['C', 'D'][len(input()) > 3])


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


n = int(input())
print('AB' + 'CD'[n // 1000])


print('ABC' if int(input().strip()) < 1000 else 'ABD')


print('AB%s' % chr(67 + (len(input()) > 3)))


n = int(input())
print(['ABC', 'ABD'][999 < n < 1999])


print('AB' + 'CD'[len(input()) > 3])


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


N = int(input())
print(['ABC', 'ABD'][N >= 10 ** 3])


print('AABBCD'[int(input()) >= 1000::2])


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


n = int(input())
if 1 <= n and 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)


print('AB' + chr(67 + int(input()) // 1000))


X = int(input())
if X < 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')


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')


print('AB' + ('C', 'D')[int(input()) > 999])


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


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


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


n = int(input())
print('AB' + ('C' * (n <= 999) or 'D'))


N = int(input())
print('AB' + chr(67 + (N > 999)))


print('AABBDC'[int(input()) < 1000::2])


n = int(input())
print('AB' + 'C' * (n < 1000) + 'D' * (n >= 1000))


print('AB' + ('C' if int(input()) < 1000 else 'D'))


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


x = input()
i = int(x)
if i < 1000:
	print('ABC')
elif i <= 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 1 <= N <= 999:
	print('ABC')
else:
	print('ABD')


n = int(input())
print('AB' + chr(ord('C') + int(n / 1000)))


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


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')
elif N > 999:
	print('ABD')


i = int(input())
if i < 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 < 1000:
	print('ABC')
elif 1000 <= N <= 1998:
	print('ABD')
else:
	print('IDK')


print('AB' + ('D' if len(input()) == 4 else 'C'))


print('AB' + ['D', 'C'][len(input()) < 4])


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


print('AB' + 'DC'[not input()[3:]])


N = int(input().strip())
print('AB' + 'C D'.split()[N >= 1000])


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


print('ABC' if len(input().rstrip()) <= 3 else 'ABD')


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


print('AB' + ('C' if int(input()) <= 999 else 'D'))


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


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


print('AB' + 'CD'[len(input()) == 4])


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


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


print('AB' + 'DC'[int(input()) < 1000])


import sys
import math
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('\x1b[33m', *a, '\x1b[0m', **dict(file=sys.stderr, **kw))
N = ini()
if N <= 999:
	print('ABC')
else:
	print('ABD')


print('AB' + 'CCCCD'[len(input())])


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())
S = 'ABC'
if 1000 <= N <= 1998:
	S = 'ABD'
print(S)


ans = 'ABC'
if int(input()) > 999:
	ans = 'ABD'
print(ans)