import Control.Monad

main = do
    s <- getLine
    putStrLn $ show $ solve s

solve :: String -> Int
solve "" = 0
solve s  = max (length $ takeWhile ok s) (solve $ tail s)
  where
    ok c = elem c "ACGT"