"use strict";
const Main = (input) =>{
    let xs = input.trim().split('');
    let count = 1;
    let ans = [];
    for(let i=0; i<xs.length; i++){
      if(xs[i]=="A"|| xs[i]=="G"||xs[i]=="C"||xs[i]=="T"){
        if(count==0){
          ans.push(count=1);
        }else{
          ans.push(count+=1);
          }
       }else{
       ans.push(count=0);
       }
    }
    //console.log(ans);
    const compare = (a,b) =>{
       return b - a;
    }
    ans.sort(compare)
    
    if(ans[0]==0){
       console.log(0);
    }else if(ans[0]==1){
       console.log(ans[0]);
    }else{
       console.log(ans[0]);
    }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));