function main(input) {
  var str = input.split("\n");
  str = str[0];
  var rep = str.replace(/[^ATGC]/g, "*");
  var sp = rep.split("*");

  var max = 0;
  for(i=0; i<sp.length; i++){
    var leg = sp[i].length;
    if(leg > max){
      max = leg;
    }
  }

  console.log(max);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
