fun main(arr:Array<String>) {
    val acgt = "ACGT"
    val mjr = readLine()!!
    var ans = 0
    for(i in (0 .. mjr.length)) {
        for(j in (i..mjr.length)) {
            val wd = mjr.substring(i,j)
            if(wd.all { acgt.contains(it) }) {
                ans = Math.max(ans, wd.length)
            }
        }
    }
    println(ans)

}
