fun main(args : Array<String>) {
    val s = readLine()!!
    val regex = "[ACGT]+".toRegex()

    var max = 0
    regex.findAll(s).forEach {
        max = Math.max(max, it.value.length)
    }

    println(max)
}