import java.util.*;
public class Main {

	/*
	 * 122B - 2nd Solution
	 * 
	 * For every right end point of a substring, we try to find the farthest left end point 
	 * Done so by having a loop to control the right end point 
	 * And then start going away from the right end point one by one
	 * The first if statement is that if the j-th character is not part of ACGT then we can just stop there because going any further won't produce an AGCT string
	 * The else if statement just means that if all the letters before the right end point (including itself) is part of AGCT then [0 ... i] is a possible AGCT string
	 * 
	 * Time Complexity O(N^2), Memory Complexity O(N)
	 * 
	 */
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int N = s.length();
		int ans = 0;
		for(int i = 0; i<N; i++) {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {

	/*
	 * 122B - 2nd Solution
	 * 
	 * For every right end point of a substring, we try to find the farthest left end point 
	 * Done so by having a loop to control the right end point 
	 * And then start going away from the right end point one by one
	 * The first if statement is that if the j-th character is not part of ACGT then we can just stop there because going any further won't produce an AGCT string
	 * The else if statement just means that if all the letters before the right end point (including itself) is part of AGCT then [0 ... i] is a possible AGCT string
	 * 
	 * Time Complexity O(N^2), Memory Complexity O(N)
	 * 
	 */
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int N = s.length();
		int ans = 0;
		for(int i = 0; i<N; i++) {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int N = s.length();
		int ans = 0;
		for(int i = 0; i<N; i++) {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int N = s.length();
		int ans = 0;
		for(int i = 0; i<N; i++) {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		}
		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 int N = s.length(); N s.length() s.length s int ans = 0; ans 0 for(int i = 0; i<N; i++) {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		} {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		} for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			} int j = i; int j = i; j i j>=0 j 0 j-- j-- j {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			} {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			} if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				} s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T' s.charAt(j) != 'G' s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T' s.charAt(j) != 'A' s.charAt(j) s.charAt s j 'A' s.charAt(j) != 'C' s.charAt(j) s.charAt s j 'C' s.charAt(j) != 'G' s.charAt(j) s.charAt s j 'G' s.charAt(j) != 'T' s.charAt(j) s.charAt s j 'T' {
					ans = Math.max(ans, i - j);
					break;
				} ans = Math.max(ans, i - j) ans Math.max(ans, i - j) Math.max Math ans i - j i j break; if(j == 0) {
					ans = Math.max(ans, i+1);
				} j == 0 j 0 {
					ans = Math.max(ans, i+1);
				} ans = Math.max(ans, i+1) ans Math.max(ans, i+1) Math.max Math ans i+1 i 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	/*
	 * 122B - 2nd Solution
	 * 
	 * For every right end point of a substring, we try to find the farthest left end point 
	 * Done so by having a loop to control the right end point 
	 * And then start going away from the right end point one by one
	 * The first if statement is that if the j-th character is not part of ACGT then we can just stop there because going any further won't produce an AGCT string
	 * The else if statement just means that if all the letters before the right end point (including itself) is part of AGCT then [0 ... i] is a possible AGCT string
	 * 
	 * Time Complexity O(N^2), Memory Complexity O(N)
	 * 
	 */
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int N = s.length();
		int ans = 0;
		for(int i = 0; i<N; i++) {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		}
		System.out.println(ans);
	}
} public class Main {

	/*
	 * 122B - 2nd Solution
	 * 
	 * For every right end point of a substring, we try to find the farthest left end point 
	 * Done so by having a loop to control the right end point 
	 * And then start going away from the right end point one by one
	 * The first if statement is that if the j-th character is not part of ACGT then we can just stop there because going any further won't produce an AGCT string
	 * The else if statement just means that if all the letters before the right end point (including itself) is part of AGCT then [0 ... i] is a possible AGCT string
	 * 
	 * Time Complexity O(N^2), Memory Complexity O(N)
	 * 
	 */
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int N = s.length();
		int ans = 0;
		for(int i = 0; i<N; i++) {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.*;
public class Main {

	/*
	 * 122B - 2nd Solution
	 * 
	 * For every right end point of a substring, we try to find the farthest left end point 
	 * Done so by having a loop to control the right end point 
	 * And then start going away from the right end point one by one
	 * The first if statement is that if the j-th character is not part of ACGT then we can just stop there because going any further won't produce an AGCT string
	 * The else if statement just means that if all the letters before the right end point (including itself) is part of AGCT then [0 ... i] is a possible AGCT string
	 * 
	 * Time Complexity O(N^2), Memory Complexity O(N)
	 * 
	 */
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int N = s.length();
		int ans = 0;
		for(int i = 0; i<N; i++) {
			for(int j = i; j>=0; j--) {
				if(s.charAt(j) != 'A' && s.charAt(j) != 'C' && s.charAt(j) != 'G' && s.charAt(j) != 'T') {
					ans = Math.max(ans, i - j);
					break;
				}
				else if(j == 0) {
					ans = Math.max(ans, i+1);
				}
			}
		}
		System.out.println(ans);
	}
}
