function Main(input){
  
  var str = input.trim();
  var len = str.length;
  var kekka = 0;
  var tmp = 0;

 for(i=0;i<len;i++){ 
 //var head = str.substr(0,1);
              // console.log(head);
            //console.log(str.match(/^[ACGT]/));
    //console.log(str);
   if(str.match(/^[ACGT]/) !== null){
     var str = str.substr(1);
     tmp++;
       //console.log("tmp:"+tmp);
     if(tmp>kekka){
       kekka = tmp;
              //console.log("kekka:"+kekka);
     }
   }//if true end
     else{
       var str = str.substr(1);
       tmp = 0;
       
     }
  
 }
  console.log(kekka);
}//function end
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));