var input = require('fs').readFileSync('/dev/stdin', 'utf8').split(/\s/)[0];
var max = 0;
var startIndex = 0;
var tailIndex = 0;
while(startIndex < input.length && input.length - startIndex > max) {
  	tailIndex = startIndex
	while(tailIndex < input.length) {
      if(!/A|C|G|T/.test(input[tailIndex])) {
        break;
      }
      tailIndex+=1
    }
  	var n = tailIndex - startIndex;
  	if(n > max) max = n;
	  startIndex+=1;
}

console.log(max)