"use strict";
    
const main = arg => {
    const S = arg.split("\n")[0].split("");
    let streak = [];
    let temp = 0;
    
    for(let i in S) {
        if(S[i] == "A" || S[i] == "T" || S[i] == "C" || S[i] == "G") {
            temp++;
        } else {
            streak.push(temp);
            temp = 0;
        }
    }

    console.log(Math.max(...streak));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));