const reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout
});
const helix = ["A", "T", "C", "G"];
reader.on("line", function (line) {
  console.log(line);
  let max = 0;
  let tmp = 0;
  for (let i = 0; i < line.length; i++) {
    if (helix.indexOf(line[i]) != -1) {
      tmp++;
      if (max < tmp) max = tmp;
    } else {
      tmp = 0;
    }
  }
  console.log(max);
});
