import Data.List

p :: Char -> Bool
p c =  case c of 'A' -> True
                 'T' -> True
                 'C' -> True
                 'G' -> True
                 otherwise -> False

main :: IO ()
main = do
  s <- getLine
  print $ (\s -> if s == [] then 0 else maximum s) $ map length $ filter (\s -> p $ head s) $ groupBy (\a b -> p a && p b) s
