input = require("fs").readFileSync("/dev/stdin", "utf8");
ans = 0;
input = input.split("");
ACGT = ['A','C','G','T'];
kar = 0;
for(i = 0; i < input.length; i++){
    t = true;
    for(j = 0; j < 4; j++){
        if(input[i] === ACGT[j]){
            kar++;
            t = false;
            break;
        }
    }
    if(t){
        ans = Math.max(kar,ans);
        kar = 0;
    }
}
console.log(ans);