solve s = f s 0
  where f [] n = n
        f s n =
          let
            n' = length $ takeWhile (flip elem "ACGT") s;
            s2 = dropWhile (flip elem "ACGT") s;
            s3 = dropWhile (not . flip elem "ACGT") s2
          in f s3 (max n n')

main = getLine >>= putStrLn . show. solve
