fun main() {
    var s= readLine()!!
    var max=0
    var tmp=0
    for (chr in s){
        if (chr =='A' ||chr =='G' ||chr =='C' ||chr =='T' ){
            tmp++
        }else{
            if (max<tmp){
                max=tmp
            }
            tmp=0
        }
    }
    println(kotlin.math.max(max, tmp))
}