import Control.Applicative
import Control.Monad
import Data.List
import Data.Array

main = do
  s <- getLine
  print $ maximum $ scanl (\acc c -> if c == 'A' || c == 'T' || c == 'G' || c == 'C' then acc + 1 else 0) 0 s