ret [] n m = m
ret ('T':as) n m = ret as (n + 1) m
ret ('A':as) n m = ret as (n + 1) m
ret ('C':as) n m = ret as (n + 1) m
ret ('G':as) n m = ret as (n + 1) m
ret (_:as) n m = ret as 0 $ max n m

main = do
  l <- getLine
  putStrLn $ show $ ret l 0 0
