{-# LANGUAGE BangPatterns #-}

import Control.Monad
import Data.List
import Data.Bits
import Debug.Trace
import Data.Maybe
import qualified Data.ByteString.Char8 as C

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

solve = solveSub 0 0
  where
    solveSub maxlen len [] = max maxlen len
    solveSub maxlen len (x:xs) =
      if atgc x
        then solveSub maxlen (len + 1) xs
        else solveSub (max maxlen len) 0 xs

atgc b
  | b == 'A' = True
  | b == 'T' = True
  | b == 'G' = True
  | b == 'C' = True
  | otherwise = False

-- 以下ライブラリ

readInts :: IO [Int]
readInts = map (fst . fromJust . C.readInt) . C.words <$> C.getLine

readNInts :: Int -> IO [[Int]]
readNInts = flip replicateM readInts

readIntegers :: IO [Integer]
readIntegers = map (fst . fromJust . C.readInteger) . C.words <$> C.getLine

readNIntegers :: Int -> IO [[Integer]]
readNIntegers = flip replicateM readIntegers

getNLns :: Int -> IO [String]
getNLns = flip replicateM getLine