function Main(input) {
  input = input.trim()
  var S = input.split("");
  var combo = 0;
  var ans = 0;
  for(var i=0;i<S.length;i++){
    if(S[i]=="A"||S[i]=="G"||S[i]=="C"||S[i]=="T"){
      combo++;
      if(ans<combo){
        ans=combo;
      }
    }else{
      combo = 0;
    }
  }
  console.log(ans)
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));