function main(arg) {
	var x = arg.split("\n")[0].split("")
	var g = ['A','C','G','T']
	var ans = 0
	for (var i = 0; i < x.length; i++) {
		var xi = x[i]
		for (var j = 0; j < g.length; j++) {
			if (g[j] == xi) {
				x[i] = '*'
			}
		}
	}
	var max = 0
	x = x.join("").split(/[a-bA-b]/)
	for (var i = 0; i < x.length; i++) {
		var n = x[i].length
		if (max < n) {
			max = n
		}
	}
	console.log(max)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));