import Data.List

atgc :: Char -> Bool
atgc 'A' = True
atgc 'C' = True
atgc 'G' = True
atgc 'T' = True
atgc othrewise = False

part [] = []
part xs = [a | a <- xs] : part (tail xs)

f xs = last $ sort $ map (length . takeWhile atgc) (part xs)

main :: IO ()
main = do
    s <- getLine
    putStrLn $ show $ f s
