
function Main(input) {
  const reg = /[ATGC]+/
  let ans = 0;
  for (let i = 0; i < input.length; i++) {
    const mat = input.slice(i).match(reg)
    let len = 0
    if (mat !== null) {
      len = mat[0].length
    }
    if (ans < len) {
      ans = len
    }
  }
  console.log(ans)
};

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