fun main(args: Array<String>) {
    val s = readLine()!!.toString()
    var most = 0
    var cnt = 0
    s.forEach { char ->
        val it = char.toString()
        if (it == "A" || it == "C" || it == "G" || it == "T") {
            cnt++
        } else {
            if (cnt > most) {
                most = cnt
            }
            cnt = 0
        }
    }
    println(if (cnt >0 && cnt > most) cnt else most)
}