import Data.List

solve :: String -> String
solve [] = ""
solve (x:xs) = char:solve xs
  where char = if x `elem` "ACGT" then 'o' else 'x'

main :: IO ()
main = do
  s <- getLine
  let count = map (\x -> if 'x' `elem` x then 0 else length x)
  print . maximum . count $ group $ solve s