fun main(args: Array<String>) {
    val acgt = setOf('A', 'C', 'G', 'T')
    var size = 0
    var max = 0
    readLine()!!.forEach { c ->
        if (acgt.contains(c)) {
            size++
            max = Math.max(max, size)
        } else {
            size = 0
        }
    }
    println(max)
}
