import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = 0;
		String s = sc.next();
		char[] a = s.toCharArray();
		int max = 0;
		
		if(a.length==1) {
			if(a[0] == 'A' || a[0] == 'C' || a[0] == 'G' || a[0] == 'T') {
				System.out.println(1);
				System.exit(0);
			}
			else {
				System.out.println(0);
				System.exit(0);
			}
			
		}
		

		for (int i = 0; i < a.length - 1; i++) {
			count = 0;
			if (a[i] == 'A' || a[i] == 'C' || a[i] == 'G' || a[i] == 'T') {
				count++;
			}
			for (int j = i + 1; j < a.length; j++) {
				if (a[j] == 'A' || a[j] == 'C' || a[j] == 'G' || a[j] == 'T') {
					count++;
				} else {
					j = a.length;
				}
			}
			max = Math.max(max, count);
		}
		System.out.println(max);

		sc.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = 0;
		String s = sc.next();
		char[] a = s.toCharArray();
		int max = 0;
		
		if(a.length==1) {
			if(a[0] == 'A' || a[0] == 'C' || a[0] == 'G' || a[0] == 'T') {
				System.out.println(1);
				System.exit(0);
			}
			else {
				System.out.println(0);
				System.exit(0);
			}
			
		}
		

		for (int i = 0; i < a.length - 1; i++) {
			count = 0;
			if (a[i] == 'A' || a[i] == 'C' || a[i] == 'G' || a[i] == 'T') {
				count++;
			}
			for (int j = i + 1; j < a.length; j++) {
				if (a[j] == 'A' || a[j] == 'C' || a[j] == 'G' || a[j] == 'T') {
					count++;
				} else {
					j = a.length;
				}
			}
			max = Math.max(max, count);
		}
		System.out.println(max);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = 0;
		String s = sc.next();
		char[] a = s.toCharArray();
		int max = 0;
		
		if(a.length==1) {
			if(a[0] == 'A' || a[0] == 'C' || a[0] == 'G' || a[0] == 'T') {
				System.out.println(1);
				System.exit(0);
			}
			else {
				System.out.println(0);
				System.exit(0);
			}
			
		}
		

		for (int i = 0; i < a.length - 1; i++) {
			count = 0;
			if (a[i] == 'A' || a[i] == 'C' || a[i] == 'G' || a[i] == 'T') {
				count++;
			}
			for (int j = i + 1; j < a.length; j++) {
				if (a[j] == 'A' || a[j] == 'C' || a[j] == 'G' || a[j] == 'T') {
					count++;
				} else {
					j = a.length;
				}
			}
			max = Math.max(max, count);
		}
		System.out.println(max);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int count = 0;
		String s = sc.next();
		char[] a = s.toCharArray();
		int max = 0;
		
		if(a.length==1) {
			if(a[0] == 'A' || a[0] == 'C' || a[0] == 'G' || a[0] == 'T') {
				System.out.println(1);
				System.exit(0);
			}
			else {
				System.out.println(0);
				System.exit(0);
			}
			
		}
		

		for (int i = 0; i < a.length - 1; i++) {
			count = 0;
			if (a[i] == 'A' || a[i] == 'C' || a[i] == 'G' || a[i] == 'T') {
				count++;
			}
			for (int j = i + 1; j < a.length; j++) {
				if (a[j] == 'A' || a[j] == 'C' || a[j] == 'G' || a[j] == 'T') {
					count++;
				} else {
					j = a.length;
				}
			}
			max = Math.max(max, count);
		}
		System.out.println(max);

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

		for (int i = 0; i < a.length - 1; i++) {
			count = 0;
			if (a[i] == 'A' || a[i] == 'C' || a[i] == 'G' || a[i] == 'T') {
				count++;
			}
			for (int j = i + 1; j < a.length; j++) {
				if (a[j] == 'A' || a[j] == 'C' || a[j] == 'G' || a[j] == 'T') {
					count++;
				} else {
					j = a.length;
				}
			}
			max = Math.max(max, count);
		}
		System.out.println(max);

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = 0;
		String s = sc.next();
		char[] a = s.toCharArray();
		int max = 0;
		
		if(a.length==1) {
			if(a[0] == 'A' || a[0] == 'C' || a[0] == 'G' || a[0] == 'T') {
				System.out.println(1);
				System.exit(0);
			}
			else {
				System.out.println(0);
				System.exit(0);
			}
			
		}
		

		for (int i = 0; i < a.length - 1; i++) {
			count = 0;
			if (a[i] == 'A' || a[i] == 'C' || a[i] == 'G' || a[i] == 'T') {
				count++;
			}
			for (int j = i + 1; j < a.length; j++) {
				if (a[j] == 'A' || a[j] == 'C' || a[j] == 'G' || a[j] == 'T') {
					count++;
				} else {
					j = a.length;
				}
			}
			max = Math.max(max, count);
		}
		System.out.println(max);

		sc.close();
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = 0;
		String s = sc.next();
		char[] a = s.toCharArray();
		int max = 0;
		
		if(a.length==1) {
			if(a[0] == 'A' || a[0] == 'C' || a[0] == 'G' || a[0] == 'T') {
				System.out.println(1);
				System.exit(0);
			}
			else {
				System.out.println(0);
				System.exit(0);
			}
			
		}
		

		for (int i = 0; i < a.length - 1; i++) {
			count = 0;
			if (a[i] == 'A' || a[i] == 'C' || a[i] == 'G' || a[i] == 'T') {
				count++;
			}
			for (int j = i + 1; j < a.length; j++) {
				if (a[j] == 'A' || a[j] == 'C' || a[j] == 'G' || a[j] == 'T') {
					count++;
				} else {
					j = a.length;
				}
			}
			max = Math.max(max, count);
		}
		System.out.println(max);

		sc.close();
	}
}
