import Data.List (inits, tails)


contSubSeqs :: String -> [String]
contSubSeqs = concatMap inits . tails


isACGTStr :: String -> Bool
isACGTStr = all (\c -> c == 'A' || c == 'C' || c == 'G' || c == 'T')


lenOfLongestACGTSTr :: String -> Int
lenOfLongestACGTSTr = maximum . fmap length . filter isACGTStr . contSubSeqs

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