const val MOD: Long = (1e9+7).toLong()

fun main(args: Array<String>) {
    val s = readLine()!!

    val x = s.map{
        (it == 'A') or (it == 'T') or (it == 'C') or (it == 'G')
    }

    var max = 0
    var stmax = -1
    var enmax = -1
    var a = 0
    var st = -1
    var en = -1
    for ((i, y) in x.withIndex()) {
        if (y) {
            if (a == 0) {
                st = i
            }
            a += 1
        } else {
            if (a > max) {
                max = a
                stmax = st
                enmax = i-1
            }
            a = 0
        }
    }
    if (a > max) {
        max = a
        stmax = st
        enmax = s.length-1
    }

    println(max)
}
