main = do
    s <- getLine
    let y = ans s
    print y
    

acgt :: Char -> Bool
acgt x = if x `elem` ['A', 'C', 'G', 'T']
             then True
        else False

acLength :: String -> Int
acLength [] = 0
acLength (x:xs)
    | acgt x = acLength xs + 1
    | otherwise = 0

ans :: String -> Int
ans [] = 0
ans (x:xs) = max (acLength (x:xs)) (ans xs) 
