program sample
	implicit none
    integer :: N
    
    read(*,*) N
    
    y=mod(x,10)
    
    if (N<=999) then
    	write(*,*) 'ABC'
    else
    	write(*,*) 'ABD'
	end if

    stop
end program sample
