const main = stdin => {
  const S = stdin.trim()

  let max = ''
  let tmp = ''
  for (let i = 0; i < S.length; i++) {
    if (!(S[i] === 'A' || S[i] === 'C' || S[i] === 'G' || S[i] === 'T')) {
      if (tmp.length > max.length) {
        max = tmp
      }
      tmp = ''
      continue
    }
    tmp += S[i]
  }
  if (tmp.length > max.length) {
    max = tmp
  }

  console.log(max.length);
}


// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
