import           Data.List
main = do
    s <- getLine :: IO String
    print $ maximum $ foldl f [0] s
  where
    f :: [Int] -> Char -> [Int]
    f (a:acc) x = if x `elem` "ACGT"
                     then (a+1):acc else 0:a:acc