
import std.conv;
import std.stdio;
import std.string;

void main()
{
	auto n = readln.strip.to!int;
	writeln( solve( n ) );
}

auto solve( in int n )
{
	if( n < 1000 ) return "ABC";
	else           return "ABD";
}

unittest
{
	assert( solve( 999 ) == "ABC" );
	assert( solve( 1000 ) == "ABD" );
	assert( solve( 1481 ) == "ABD" );
}
