import Data.List

getlength:: String -> Int -> [Int]
getlength (s:xs) n = 
  if isInfixOf [s] "ACGT" then 
    [n] ++ getlength xs (n+1)
  else 
    [0] ++ getlength xs 1
getlength [] n = []
    


main:: IO()
main = do
  s <- getLine
  print $ maximum (getlength s 1)