import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
import std.math;

void main() {
	auto S = readln.split[0];
    auto cnt = 0;
    string[] answers = [ "" ];
    while (cnt < S.length) {
        if ( S[cnt] == 'A' || S[cnt] == 'T' || S[cnt] == 'G' || S[cnt] == 'C') {
            answers[$-1] ~= S[cnt];
         }
        else {
            answers ~= "";
        }
        cnt++;
    }
    string ans;
    answers.each!(x => x.length > ans.length ? (ans = x) : "");
    ans.length.writeln;
}
