import java.util.Scanner


object Main{
  def read() = {
    val sc = new Scanner(System.in)
    val s = sc.next()
    s
  }

  def isATGCStr(s:String): Boolean = s.forall(c => "ATGC".contains(c))

  def solve(s:String): Int = {
    val subStrs = for(
    i<- 0 to s.length;
    j <- i to s.length )yield s.substring(i,j)
    subStrs.filter(isATGCStr).map(_.length).max
  }



  def main(args: Array[String]): Unit = {
    val s = read()
    println(solve(s))
  }
}