fun main(args:Array<String>) {
    val b = readLine()!!.toString()
    var list = mutableSetOf<Int>()
    var cnt=0

    for (i in 0 until b.length){
        cnt=0
        while (b[i+cnt]=='A'||b[i+cnt]=='T'||b[i+cnt]=='C'||b[i+cnt]=='G'){
            cnt++
            list.add(cnt)
            if (i+cnt>=b.length) break
        }
    }
    println(list?.max()?:0)
}
