'use strict';
function Main(input) {
    input = input.split("\n");
    let tmp = input[0].split("");

    let A = tmp.reduce((a, x) => {
        if (x == "A" || x == "C" || x == "G" || x == "T") {
            a[a.length-1]++;
            return a;
        }
        a.push(0);
        return a;
    },[0]);
    console.log(A.reduce((a,b)=>a>b?a:b));
}

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