function main(input) {
  const result = input
    .trim()
    .split(/[^ATCG]/)
    .sort((a, b) => {
      return b.length - a.length;
    })[0];
  console.log(result.length);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
