import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int tmp = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		}
		ans = Math.max(ans, tmp);
		System.out.println(ans);
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int tmp = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		}
		ans = Math.max(ans, tmp);
		System.out.println(ans);
		sc.close();
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int tmp = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		}
		ans = Math.max(ans, tmp);
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int tmp = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		}
		ans = Math.max(ans, tmp);
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s int tmp = 0; tmp 0 int ans = 0; ans 0 for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		} 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') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		} {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		} if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 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' {
				tmp++;
			} tmp++ tmp {
				ans = Math.max(ans, tmp);
				tmp = 0;
			} ans = Math.max(ans, tmp) ans Math.max(ans, tmp) Math.max Math ans tmp tmp = 0 tmp 0 ans = Math.max(ans, tmp) ans Math.max(ans, tmp) Math.max Math ans tmp System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int tmp = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		}
		ans = Math.max(ans, tmp);
		System.out.println(ans);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int tmp = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		}
		ans = Math.max(ans, tmp);
		System.out.println(ans);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int tmp = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				tmp++;
			} else {
				ans = Math.max(ans, tmp);
				tmp = 0;
			}
		}
		ans = Math.max(ans, tmp);
		System.out.println(ans);
		sc.close();
	}
}