module Main where

import Control.Monad
import Data.List
import Data.List.Split
import Data.Array.IO
import qualified Data.Vector as V

main :: IO ()
main = do
  s <- getLine
  print $ (maximum . map length . splitWhen (\i -> elem i "ACGT" == False)) s

solve :: [Int] -> [Int]
solve [x] = [0]
solve (a:b:cs) = b - a : (solve (b:cs))

getInt :: IO Int
getInt = read <$> getLine

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

getIntLines :: Int -> IO [Int]
getIntLines i = replicateM i getInt

getStrLines :: Int -> IO [String]
getStrLines i = replicateM i getLine
