import scala.io.StdIn._

object Main{
  def maxSize(s : Array[String]): Int ={
    s match{
      case Array() => 0
      case _ => s.maxBy(_.size).size
    }
  }
  def main(args: Array[String]): Unit ={
    val str : String = readLine()
    val res : Array[String] = str.split("[^AGCT]")
    println(maxSize(res))
  }
}