function main (sdi) {
  var input = sdi.trim();
  var a = input.match(/[ACTG]+/g);
  var l = 0;
  var r = "";
  for(var i=0; i<a.length; i++){
    if(a[i].length > l){
      l = a[i].length;
    }
  }
  console.log(l);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));