main :: IO()
main = do
       n <- read <$> getLine
       let ans = solve n
       putStrLn ans
       
solve :: Int -> String
solve n | n >= 1000 = "ABD" ++ (tail . init . show . keta $ n - 999)
         | otherwise = "ABC" ++ (tail . init . show . keta $ n)
         
keta :: Int -> String
keta n | n >= 100 = show n
       | n >= 10  = "0" ++ (show n)
       | otherwise= "00" ++ (show n)