fun main(args: Array<String>) {
    val S = readLine()!!

    println(
        S.map {
            when (it) {
                'A', 'C', 'G', 'T' -> "A"
                else -> "Z"
            }
        }.joinToString("")
            .split("Z")
            .max()
            ?.length ?: 0
    )
}