function main(input) {
    const S = input.toString();

    var ans = 0;
    var max_ans = 0;
    var test_word;

    for(var i = 0; i < S.length; i++) {
        test_word = S.charAt(i);
        switch(test_word){
            case 'A':
            case 'G':
            case 'T':
            case 'C':
                ans++;
                break;
            default:
                if(max_ans < ans)
                    max_ans = ans;
                ans = 0;
                break;
        }
    }

    if (max_ans < ans)
        max_ans = ans;

    console.log(max_ans)

    return;
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

