function Main(input) {
    input = input.split("\n")[0]
    input = input.replace(/[^ACGT]+/g, '-') // ACGT以外を置き換える
   
    const lengths = input.split('-').map(elem => elem.length) 
    console.log( Math.max(...lengths) )
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))