fun main(args: Array<String>) {
    val s = readLine()!!.toString()
    val a = arrayOf<Char>('A','C','G','T')
    var result = 0
    for(i in s.indices){
        var len = 0
        for(j in i until s.length){
            if(!a.contains(s[j]))break
            len++
        }
        if(result < len) result = len
    }
    println(result)
}
