fun main(args:Array<String>) {
    val s = readLine()!!
    var ans = ""
    for(i in s.indices) {
        for(j in (i..s.lastIndex)) {
            val tmp = s.substring(i..j)
            if(tmp.any { c-> !setOf('A', 'C', 'G', 'T').contains(c) }) {
                break
            }
            if(tmp.length > ans.length) {
                ans = tmp
            }
        }
    }
    println(ans.length)
}