import std.stdio, std.range, std.conv, std.string, std.array, std.functional;
import std.algorithm.comparison, std.algorithm.iteration, std.algorithm.mutation, std.algorithm.searching, std.algorithm.setops, std.algorithm.sorting;
import std.container.binaryheap;

void main()
{

    string S;
    // scanf("%s", &S);
    S = readln().strip();
    int res;
    foreach(i; 0..S.length)
    {
        int count;
        foreach(c; S[i..$])
        {
            if(
                c=='A' ||
                c=='C' ||
                c=='G' ||
                c=='T'
                )
                {
                    count++;
                    continue;
                }
            break;
        }
        res = max(res, count);
    }
    writeln(res);
}
