main :: IO ()
main = do
  s <- getLine
  print (f s)

f :: String -> Int
f = fst. foldr step (0, (0, []))
  where
    step x (m, (l, xs)) = if x `elem` "ACGT" then let l' = succ l in (max l' m, (l', x : xs)) else (m, (0, []))
