program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: n

    read*, n
    if (n < 1000) then
        print'(a)', 'ABC'
    else
        print'(a)', 'ABD'
    end if
end program main