import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  print
   . maximum
   . map sum
   . group
   . map trans01 =<< getLine

trans01 c
  |(or . map (==c)) "ACGT" = 1
  |otherwise               = 0