import java.lang.Math.max

fun main(args: Array<String>) {
    val S = readLine()!!
    val st = "[ACGT]+".toRegex()
    var ans = 0
    for (s in st.findAll(S)) {
        ans = max(ans, s.value.length)
    }
    println(ans)
}