import java.util.Scanner;

public class Main{

	static String s = "";
	static String ans = "";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		solve();
		System.out.println(ans.length());
	}

	public static void solve() {
		String str;
		for (int i = s.length(); i > 0; i--) {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		}
	}

	public static boolean isACGT(String str) {
		for (int i = 0; i < str.length(); i++) {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		}
		return true;
	}

} import java.util.Scanner; Scanner java.util public class Main{

	static String s = "";
	static String ans = "";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		solve();
		System.out.println(ans.length());
	}

	public static void solve() {
		String str;
		for (int i = s.length(); i > 0; i--) {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		}
	}

	public static boolean isACGT(String str) {
		for (int i = 0; i < str.length(); i++) {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		}
		return true;
	}

} Main static String s = ""; s "" static String ans = ""; ans "" public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		solve();
		System.out.println(ans.length());
	} main {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		solve();
		System.out.println(ans.length());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) s = sc.next() s sc.next() sc.next sc solve() solve System.out.println(ans.length()) System.out.println System.out System System.out ans.length() ans.length ans String[] args args public static void solve() {
		String str;
		for (int i = s.length(); i > 0; i--) {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		}
	} solve {
		String str;
		for (int i = s.length(); i > 0; i--) {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		}
	} String str; str for (int i = s.length(); i > 0; i--) {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		} int i = s.length(); int i = s.length(); i s.length() s.length s i > 0 i 0 i-- i-- i {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		} {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		} for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			} int j = 0; int j = 0; j 0 i + j <= s.length() i + j i j s.length() s.length s j++ j++ j {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			} {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			} str = s.substring(j, i + j) str s.substring(j, i + j) s.substring s j i + j i j if (isACGT(str)) {
					ans = str;
					return;
				} isACGT(str) isACGT str {
					ans = str;
					return;
				} ans = str ans str return; public static boolean isACGT(String str) {
		for (int i = 0; i < str.length(); i++) {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		}
		return true;
	} isACGT {
		for (int i = 0; i < str.length(); i++) {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		}
		return true;
	} for (int i = 0; i < str.length(); i++) {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		} {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		} if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			} !(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') str.charAt(i) == 'G' str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T' str.charAt(i) == 'A' str.charAt(i) str.charAt str i 'A' str.charAt(i) == 'C' str.charAt(i) str.charAt str i 'C' str.charAt(i) == 'G' str.charAt(i) str.charAt str i 'G' str.charAt(i) == 'T' str.charAt(i) str.charAt str i 'T' {
				return false;
			} return false; false return true; true String str str public class Main{

	static String s = "";
	static String ans = "";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		solve();
		System.out.println(ans.length());
	}

	public static void solve() {
		String str;
		for (int i = s.length(); i > 0; i--) {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		}
	}

	public static boolean isACGT(String str) {
		for (int i = 0; i < str.length(); i++) {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		}
		return true;
	}

} public class Main{

	static String s = "";
	static String ans = "";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		solve();
		System.out.println(ans.length());
	}

	public static void solve() {
		String str;
		for (int i = s.length(); i > 0; i--) {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		}
	}

	public static boolean isACGT(String str) {
		for (int i = 0; i < str.length(); i++) {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		}
		return true;
	}

} Main
import java.util.Scanner;

public class Main{

	static String s = "";
	static String ans = "";

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		solve();
		System.out.println(ans.length());
	}

	public static void solve() {
		String str;
		for (int i = s.length(); i > 0; i--) {
			for (int j = 0; i + j <= s.length(); j++) {
				str = s.substring(j, i + j);
				if (isACGT(str)) {
					ans = str;
					return;
				}
			}
		}
	}

	public static boolean isACGT(String str) {
		for (int i = 0; i < str.length(); i++) {
			if (!(str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T')) {
				return false;
			}
		}
		return true;
	}

}
