import qualified Data.ByteString.Char8 as BS
import Data.List 

main = do 
  s <- getLine
  print $ maximum $ map length $ filter isACGT $ sublists s

sublists :: [a] -> [[a]]
sublists xs =
  concat $ map noEmptyTails $ inits xs

noEmptyTails :: [a] -> [[a]]
noEmptyTails [] = [[]]
noEmptyTails [x] = [[x]]
noEmptyTails (x:xs) = (x:xs):(noEmptyTails xs)

isACGT :: String -> Bool
isACGT s = all (\c -> c `elem` "ATCG") s