function Main(input) {
  var pattern = /A|C|G|T/g;
  var result = input.search(pattern);

  if(result < 0) {
    return console.log("0");
  }

  var ary = new Array();
  var result_array = new Array();
  var str = 0;
  var counter = 1;

  while ((ary = pattern.exec(input)) !== null) {
    if(str == (pattern.lastIndex - 1)) {
      counter++;
    } else {
      result_array.push(counter);
      counter = 1;
    }
    str = pattern.lastIndex;
  }
  result_array.push(counter);
  console.log(Math.max.apply(null, result_array));

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));