fun main(args: Array<String>) {
    val s = readLine()!!.toCharArray()
    var cnt = 0
    var max = 0
    for (c in s) {
        when (c) {
            'A', 'C', 'G', 'T' -> {
                cnt = cnt + 1
                if (max < cnt) {
                    max = cnt
                }
            }
            else -> {
                cnt = 0
                if (max < cnt) {
                    max = cnt
                }
            }
        }
    }
    println(max)
}