
fun main(args:Array<String>) {
    var s = readLine()!!
    val delimiter = s.filter { it !in "ACGT" }.toSet()
    delimiter.forEach{s = s.replace(it, '0')}
    val ans = s.split('0').map { it.length }.max()
    println(ans)
}