import Data.List (tails)

main :: IO ()
main = getLine >>= print . solve

solve :: String -> Int
solve = maximum . map length . allACGTs

allACGTs :: String -> [String]
allACGTs = map (takeWhile isACGT) . tails

isACGT :: Char -> Bool
isACGT = flip elem "ACGT"
