fun main() {
    val S = readLine()!!
    var max = 0
    val l = listOf("A", "C", "G", "T")
    for (i in S.indices) {
        var ix = i
        var cnt = 0
        while (ix <= S.length-1 && S[ix].toString() in l) {
            cnt ++
            ix ++
        }
        if (cnt > max) {
            max = cnt
        }
    }
    println(max)
}