function Main(input) {
    input = input.replace(/[^ACGT]/g,"_");
    input = input.split("_");
    var len = 0
    for(var i of input){
      if(len < i.length)len = i.length
    }
    console.log(len)
    return 0
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));