unittest
{
	assert( [ "ATCODER" ].parse.expand.solve == 3 );
	assert( [ "HATAGAYA" ].parse.expand.solve == 5 );
	assert( [ "SHINJUKU" ].parse.expand.solve == 0 );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto s = input.front;
	return tuple( s );
}

auto solve( string s )
{
	auto ans = 0L;
	auto m = 0L;
	foreach( c; s )
	{
		if( c == 'A' || c == 'C' || c == 'G' || c == 'T' )
		{
			m++;
			if( ans < m ) ans = m;
		}
		else
		{
			m = 0;
		}
	}
	return ans;
}
