fun main (args : Array<String>) {
	val s = readLine()
	val S : String = s.toString()
	var count : Int = 0
	var result : Int = 0
	for (i in S) {
		if (i.toString() == "A" || i.toString() == "C" || i.toString() == "G" || i.toString() == "T") {
			count++
			if (result < count) {
				result = count
			}
		} else {
			count = 0
		}
	}
	println("${result}")
}