fun main(args: Array<String>) {
    val s = readLine()!!
    val re = Regex("[ACGT]+")
    val results = re.findAll(s)
    var max = 0
    for (result in results) {
        max = Math.max(result.value.length, max)
    }
    println(max)
}