import java.util.Scanner;

public class Main{
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for(int i = 0; i < S.length(); i++) {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for(int i = 0; i < S.length(); i++) {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		}
		System.out.println(ans);
	}
} Main static long mod = 1000000007; mod 1000000007 public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for(int i = 0; i < S.length(); i++) {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for(int i = 0; i < S.length(); i++) {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		}
		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 ans = 0; ans 0 for(int i = 0; i < S.length(); i++) {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		} {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		} for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			} int j = i + 1; int j = i + 1; j i + 1 i 1 j < S.length() + 1 j S.length() + 1 S.length() S.length S 1 j++ j++ j {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			} {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			} String subS = S.substring(i, j); subS S.substring(i, j) S.substring S i j boolean isATGC = true; isATGC true for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				} int k = 0; int k = 0; k 0 k < subS.length() k subS.length() subS.length subS k++ k++ k {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				} {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				} char c = subS.charAt(k); c subS.charAt(k) subS.charAt subS k if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue; c == 'A' || c == 'T' || c == 'G' || c == 'C' c == 'G' c == 'A' || c == 'T' || c == 'G' || c == 'C' c == 'A' c 'A' c == 'T' c 'T' c == 'G' c 'G' c == 'C' c 'C' continue; isATGC = false isATGC false if(isATGC) ans = Math.max(ans, subS.length()); isATGC ans = Math.max(ans, subS.length()) ans Math.max(ans, subS.length()) Math.max Math ans subS.length() subS.length subS System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for(int i = 0; i < S.length(); i++) {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		}
		System.out.println(ans);
	}
} public class Main{
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for(int i = 0; i < S.length(); i++) {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main{
	static long mod = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int ans = 0;
		for(int i = 0; i < S.length(); i++) {
			for(int j = i + 1; j < S.length() + 1; j++) {
				String subS = S.substring(i, j);
				boolean isATGC = true;
				for(int k = 0; k < subS.length(); k++) {
					char c = subS.charAt(k);
					if(c == 'A' || c == 'T' || c == 'G' || c == 'C') continue;
					isATGC = false;
				}
				if(isATGC) ans = Math.max(ans, subS.length());
			}
		}
		System.out.println(ans);
	}
}
