import scala.io.StdIn

object Main {

  def main(args: Array[String]): Unit = {

    val s = StdIn.readLine()
    val ans = s.foldLeft(Vector(0)){(acc, c) =>
      if (List('A', 'C', 'G', 'T').contains(c)) {
        (acc.head + 1) +: acc
      } else {
        0 +: acc
      }}.max
    println(ans)
  }
}
