import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		char[] c = str.toCharArray();
		int ans = 0;
		int buf = 0;
		for (int i=0; i < str.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		char[] c = str.toCharArray();
		int ans = 0;
		int buf = 0;
		for (int i=0; i < str.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		char[] c = str.toCharArray();
		int ans = 0;
		int buf = 0;
		for (int i=0; i < str.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		}
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		char[] c = str.toCharArray();
		int ans = 0;
		int buf = 0;
		for (int i=0; i < str.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan scan.close() scan.close scan char[] c = str.toCharArray(); c str.toCharArray() str.toCharArray str int ans = 0; ans 0 int buf = 0; buf 0 for (int i=0; i < str.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		} int i=0; int i=0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		} {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		} if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			} c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' c[i] == 'G' c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' c[i] == 'A' c[i] c i 'A' c[i] == 'C' c[i] c i 'C' c[i] == 'G' c[i] c i 'G' c[i] == 'T' c[i] c i 'T' {
				buf +=1;
			} buf +=1 buf 1 {
				buf = 0;
			} buf = 0 buf 0 if (buf > ans) ans = buf; buf > ans buf ans ans = buf ans buf System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		char[] c = str.toCharArray();
		int ans = 0;
		int buf = 0;
		for (int i=0; i < str.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		}
		System.out.println(ans);
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		char[] c = str.toCharArray();
		int ans = 0;
		int buf = 0;
		for (int i=0; i < str.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		scan.close();

		char[] c = str.toCharArray();
		int ans = 0;
		int buf = 0;
		for (int i=0; i < str.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' ) {
				buf +=1;
			} else {
				buf = 0;
			}
			if (buf > ans) ans = buf;
		}
		System.out.println(ans);
	}
}
