import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int max = 0;

		String s = sc.next();
		for(int i = 0; i < s.length(); i++) {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		}
		System.out.println(max);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int max = 0;

		String s = sc.next();
		for(int i = 0; i < s.length(); i++) {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		}
		System.out.println(max);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int max = 0;

		String s = sc.next();
		for(int i = 0; i < s.length(); i++) {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		int max = 0;

		String s = sc.next();
		for(int i = 0; i < s.length(); i++) {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		}
		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int max = 0; max 0 String s = sc.next(); s sc.next() sc.next sc for(int i = 0; i < s.length(); i++) {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		} {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		} for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			} int j = s.length(); int j = s.length(); j s.length() s.length s j >i j i j-- j-- j {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			} {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			} String temp = s.substring(i,j); temp s.substring(i,j) s.substring s i j if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				} temp.matches("[A,T,C,G]{0,}") temp.matches temp "[A,T,C,G]{0,}" {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				} if(temp.length() > max) {
					max = temp.length();
				} temp.length() > max temp.length() temp.length temp max {
					max = temp.length();
				} max = temp.length() max temp.length() temp.length temp System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int max = 0;

		String s = sc.next();
		for(int i = 0; i < s.length(); i++) {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		}
		System.out.println(max);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int max = 0;

		String s = sc.next();
		for(int i = 0; i < s.length(); i++) {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		}
		System.out.println(max);
	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int max = 0;

		String s = sc.next();
		for(int i = 0; i < s.length(); i++) {
			for(int j = s.length(); j >i;j--) {
				String temp = s.substring(i,j);
				if(temp.matches("[A,T,C,G]{0,}")) {
					
				if(temp.length() > max) {
					max = temp.length();
				}
				}
			}
		}
		System.out.println(max);
	}

}