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


-- String, Int, Char,Bool, True, False

-- e.g.
-- 1
-- [a] <- map read . words <$> getline => [1] -> a == 1
-- 1
-- a <- readlLn
-- 1 2 3
-- lst <- map read . words <$> getLine => [1, 2, 3]
-- 1 2 3
-- [l, m, n] <- map read . words <$. getLine :: IO [Int] => [1, 2, 3]
-- 'a'
-- c <- getChar => c == 'a'

main :: IO()
main = do
  s <- getLine
  print $ solve s

segments :: [a] -> [[a]]
segments = foldr (++) [] . scanr (\a b -> [a] : map (a:) b) []

mdelete :: String -> Bool
mdelete s = [] == filter (\x -> (x /= 'A') && (x /= 'C') && (x /= 'G') && (x /= 'T')) s

solve :: String -> Int
solve s = foldl f 0 [str | str <- segments s, mdelete str]
  where
    f :: Int -> String -> Int
    f l t = if l > length t
      then l
      else length t
