function Main(input) {
  input = input.trim();
  var S = input.split("");
  const test = ["A", "C", "G", "T"];
  var ans = 0;
  var now = 0;
  for (var i = 0; i < S.length; i++) {
    if (test.indexOf(S[i]) != -1) {
      now++;
      ans = Math.max(now, ans);
    } else {
      now = 0;
    }
  }

  console.log(ans);
}

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