import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		}
	}
} Main public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		}
	} main {
		try (Scanner sc = new Scanner(System.in)) {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		}
	} try (Scanner sc = new Scanner(System.in)) {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		} {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int len = str.length(); len str.length() str.length str int ans = 0; ans 0 int temp = 0; temp 0 for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			} int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			} {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			} char c = str.charAt(i); c str.charAt(i) str.charAt str i if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				} c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'G' c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'A' c 'A' c == 'C' c 'C' c == 'G' c 'G' c == 'T' c 'T' {
					temp++;
				} temp++ temp {
					ans = Math.max(ans, temp);
					temp = 0;
				} ans = Math.max(ans, temp) ans Math.max(ans, temp) Math.max Math ans temp temp = 0 temp 0 System.out.print(Math.max(ans, temp)) System.out.print System.out System System.out Math.max(ans, temp) Math.max Math ans temp String[] args args public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		}
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String str = sc.next();
			int len = str.length();
			int ans = 0;
			int temp = 0;
			for (int i = 0; i < len; i++) {
				char c = str.charAt(i);
				if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
					temp++;
				} else {
					ans = Math.max(ans, temp);
					temp = 0;
				}
			}
			System.out.print(Math.max(ans, temp));
		}
	}
}
