function myout(text){console.log(text);}//standard output
function Main(input) {
	input = input.trim();
	//input = input.trim().split(" ");
	//input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  var max = 0;
  var lastMax = 0;
  for(var i = 0; i < input.length; i++){
    var tmp = input.slice(i,i+1);
    if(tmp == "A" || tmp == "C" || tmp == "G" || tmp == "T"){
       max++;
    }else{
       lastMax = Math.max(lastMax,max);
       max = 0;
    }
  }
  lastMax = Math.max(lastMax,max);
  myout(lastMax);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
