import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int ans = 0;
		for (int i = 0; i < s.length(); i++) {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		}
		System.out.println(ans);
	}

	static public int ok(String s) {
		char c[] = s.toCharArray();
		boolean ans = true;
		for (int i = 0; i < c.length; i++) {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		}
		int a = 0;
		if (ans) {
			a = s.length();

		} else {
			a = 0;

		}
		return a;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int ans = 0;
		for (int i = 0; i < s.length(); i++) {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		}
		System.out.println(ans);
	}

	static public int ok(String s) {
		char c[] = s.toCharArray();
		boolean ans = true;
		for (int i = 0; i < c.length; i++) {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		}
		int a = 0;
		if (ans) {
			a = s.length();

		} else {
			a = 0;

		}
		return a;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int ans = 0;
		for (int i = 0; i < s.length(); i++) {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int ans = 0;
		for (int i = 0; i < s.length(); i++) {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int ans = 0; ans 0 for (int i = 0; i < s.length(); i++) {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		} {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		} for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			} int o = i; int o = i; o i o <= s.length() o s.length() s.length s o++ o++ o {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			} {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			} if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				} ans < ok(s.substring(i, o)) ans ok(s.substring(i, o)) ok s.substring(i, o) s.substring s i o {
					ans = ok(s.substring(i, o));
				} ans = ok(s.substring(i, o)) ans ok(s.substring(i, o)) ok s.substring(i, o) s.substring s i o System.out.println(ans) System.out.println System.out System System.out ans String[] args args static public int ok(String s) {
		char c[] = s.toCharArray();
		boolean ans = true;
		for (int i = 0; i < c.length; i++) {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		}
		int a = 0;
		if (ans) {
			a = s.length();

		} else {
			a = 0;

		}
		return a;
	} ok {
		char c[] = s.toCharArray();
		boolean ans = true;
		for (int i = 0; i < c.length; i++) {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		}
		int a = 0;
		if (ans) {
			a = s.length();

		} else {
			a = 0;

		}
		return a;
	} char c[] = s.toCharArray(); c s.toCharArray() s.toCharArray s boolean ans = true; ans true for (int i = 0; i < c.length; i++) {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		} {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		} if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			} !(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') (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' {
				ans = false;
			} ans = false ans false int a = 0; a 0 if (ans) {
			a = s.length();

		} else {
			a = 0;

		} ans {
			a = s.length();

		} a = s.length() a s.length() s.length s {
			a = 0;

		} a = 0 a 0 return a; a String s s public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int ans = 0;
		for (int i = 0; i < s.length(); i++) {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		}
		System.out.println(ans);
	}

	static public int ok(String s) {
		char c[] = s.toCharArray();
		boolean ans = true;
		for (int i = 0; i < c.length; i++) {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		}
		int a = 0;
		if (ans) {
			a = s.length();

		} else {
			a = 0;

		}
		return a;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int ans = 0;
		for (int i = 0; i < s.length(); i++) {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		}
		System.out.println(ans);
	}

	static public int ok(String s) {
		char c[] = s.toCharArray();
		boolean ans = true;
		for (int i = 0; i < c.length; i++) {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		}
		int a = 0;
		if (ans) {
			a = s.length();

		} else {
			a = 0;

		}
		return a;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int ans = 0;
		for (int i = 0; i < s.length(); i++) {
			for (int o = i; o <= s.length(); o++) {
				if (ans < ok(s.substring(i, o))) {
					ans = ok(s.substring(i, o));
				}
			}
		}
		System.out.println(ans);
	}

	static public int ok(String s) {
		char c[] = s.toCharArray();
		boolean ans = true;
		for (int i = 0; i < c.length; i++) {
			if (!(c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T')) {
				ans = false;
			}
		}
		int a = 0;
		if (ans) {
			a = s.length();

		} else {
			a = 0;

		}
		return a;
	}
}