import Control.Applicative
import Control.Monad
import Data.Functor
import Data.List

readInts = map read . words <$> getLine :: IO [Int]

solve s = sub 0 0 s
  where
    sub r _ [] = r
    sub r t (c:cs)
      | c `elem` "ACGT" = sub (max r (t+1)) (t+1) cs
      | otherwise = sub r 0 cs

main = getLine >>= print . solve
