import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main
{
	static boolean Valid(String S)
	{
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	}
	
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main
{
	static boolean Valid(String S)
	{
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	}
	
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	}
} Main static boolean Valid(String S)
	{
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	} Valid {
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	} for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		} char C S.toCharArray() S.toCharArray S {
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		} {
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		} if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false; C != 'A' && C != 'C' && C != 'T' && C != 'G' C != 'T' C != 'A' && C != 'C' && C != 'T' && C != 'G' C != 'A' C 'A' C != 'C' C 'C' C != 'T' C 'T' C != 'G' C 'G' return false; false return true; true String S S public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	} main {
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	} BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); BR new BufferedReader(new InputStreamReader(System.in)) String S = BR.readLine(); S BR.readLine() BR.readLine BR int Best = 0; Best 0 for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		} {
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		} String substr = S.substring(i); substr S.substring(i) S.substring S i for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			} int j = 1; int j = 1; j 1 j <= substr.length() j substr.length() substr.length substr j++ j++ j {
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			} {
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			} String result = substr.substring(0, j); result substr.substring(0, j) substr.substring substr 0 j if (Valid(result)) Best = Math.max(Best, result.length()); Valid(result) Valid result Best = Math.max(Best, result.length()) Best Math.max(Best, result.length()) Math.max Math Best result.length() result.length result System.out.println(Best) System.out.println System.out System System.out Best String[] Arguments Arguments public class Main
{
	static boolean Valid(String S)
	{
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	}
	
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	}
} public class Main
{
	static boolean Valid(String S)
	{
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	}
	
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main
{
	static boolean Valid(String S)
	{
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	}
	
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	}
}
