main = do
  s <- getLine :: IO String
  print $ maximum $ f s 0

f :: String -> Int -> [Int]
f [] _ = [0]
f [x] i = if x `elem` "ACGT" then [i+1] else [0]
f (x:xs) i
  | x `elem` "ACGT" = f xs (i+1)
  | otherwise = i : f xs 0