object Main extends App {

  val s = scala.io.StdIn.readLine()

  def solve(): Int = {
    val maxAndTmpMax = (0, 0)
    s.foldLeft(maxAndTmpMax) { case ((max, tmpMax), char) =>
      if(isValid(char)) (Math.max(max, tmpMax+1), tmpMax+1)
      else (max, 0)
    }._1
  }
  
  def isValid(char: Char): Boolean = {
    if (char == 'A' || char == 'C' || char == 'G' || char == 'T') true else false
  }


  println(solve)

}
