import Data.List

substrings :: [a] -> [[a]]
substrings = ([]:) . concatMap (tail . inits) . tails

acgt :: [Char] -> Bool
acgt [] = True
acgt (x:xs)
  | x `elem` "ACGT" = acgt xs
  | otherwise = False

main = do
  s <- getLine
  print.maximum.map length $ filter acgt $ substrings s
