fun main(args: Array<String>) {
    val s = readLine()!!
    var max=0
    var count=0
    s.forEach {
        if(it=='A'||it=='T'||it=='G'||it=='C'){
            count+=1
            if(max<count)max=count
        } else count=0
    }
    print(max)
}