import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int ans = 0;
		int l = 0;
		boolean flag = false;
		for(int i = 0; i < c.length; i++) {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		}
		if(flag && ans <= l)ans = l;
		System.out.println(ans);
	}

} 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.next();
		char[] c = s.toCharArray();
		int ans = 0;
		int l = 0;
		boolean flag = false;
		for(int i = 0; i < c.length; i++) {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		}
		if(flag && ans <= l)ans = l;
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int ans = 0;
		int l = 0;
		boolean flag = false;
		for(int i = 0; i < c.length; i++) {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		}
		if(flag && ans <= l)ans = l;
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int ans = 0;
		int l = 0;
		boolean flag = false;
		for(int i = 0; i < c.length; i++) {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		}
		if(flag && ans <= l)ans = l;
		System.out.println(ans);
	} 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 ans = 0; ans 0 int l = 0; l 0 boolean flag = false; flag false for(int i = 0; i < c.length; i++) {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 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') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		} {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		} if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 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' {
				l++;
				flag = true;
			} l++ l flag = true flag true {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			} if(flag && ans <= l)ans = l; flag && ans <= l flag ans <= l ans l ans = l ans l flag = false flag false l = 0 l 0 if(flag && ans <= l)ans = l; flag && ans <= l flag ans <= l ans l ans = l ans l 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 sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int ans = 0;
		int l = 0;
		boolean flag = false;
		for(int i = 0; i < c.length; i++) {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		}
		if(flag && ans <= l)ans = l;
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int ans = 0;
		int l = 0;
		boolean flag = false;
		for(int i = 0; i < c.length; i++) {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		}
		if(flag && ans <= l)ans = l;
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int ans = 0;
		int l = 0;
		boolean flag = false;
		for(int i = 0; i < c.length; i++) {
			if(c[i] == 'A' || c[i] == 'C'
					|| c[i] == 'G' || c[i] == 'T') {
				l++;
				flag = true;
			}else {
				if(flag && ans <= l)ans = l;
				flag = false;
				l = 0;
			}
		}
		if(flag && ans <= l)ans = l;
		System.out.println(ans);
	}

}