fun main(args: Array<String>) {
	val input = readLine() ?: return
	var max = 0
	var count = 0
	for (s in input) {
		if (s == 'A' || s == 'C' || s == 'G' || s == 'T') {
			count++
			if (count > max) {
				max = count
			}
		} else {
			count = 0
		}
	}
	println(max)
}