function main(input) {
  const arr = input
    .trim()
    .split(/[^ATCG]/)
    .map(str=>str.length);
  console.log(Math.max.apply(null, arr));
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
