program prob20
    implicit none
    integer :: n
    read(*,*) n
    if(n >= 1000) then
        write(*,'(a)') "ABD"
    else
        write(*,'(a)') "ABC"
    end if
    stop
contains
end program prob20