main = do
    str <- getLine :: IO String
    print . maximum $ f str 0

f [] _ = []
f (x:xs) n = if isATCG x then (n+1) : f xs (n+1)
                         else n : f xs 0

isATCG c = case c of
    'A' -> True
    'T' -> True
    'C' -> True
    'G' -> True
    otherwise -> False