import java.util.HashSet;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		
		int max = 0;
		String str = sc.next();
		
		for (int i = 0; i < str.length(); i++) {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		}
		System.out.println(max);
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		
		int max = 0;
		String str = sc.next();
		
		for (int i = 0; i < str.length(); i++) {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		}
		System.out.println(max);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		
		int max = 0;
		String str = sc.next();
		
		for (int i = 0; i < str.length(); i++) {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		
		int max = 0;
		String str = sc.next();
		
		for (int i = 0; i < str.length(); i++) {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		}
		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) HashSet<Character> set = new HashSet<Character>(); set new HashSet<Character>() set.add('A') set.add set 'A' set.add('C') set.add set 'C' set.add('G') set.add set 'G' set.add('T') set.add set 'T' int max = 0; max 0 String str = sc.next(); str sc.next() sc.next sc for (int i = 0; i < str.length(); i++) {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		} {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		} 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);
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		
		int max = 0;
		String str = sc.next();
		
		for (int i = 0; i < str.length(); i++) {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		}
		System.out.println(max);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		
		int max = 0;
		String str = sc.next();
		
		for (int i = 0; i < str.length(); i++) {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		}
		System.out.println(max);
	}

} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		HashSet<Character> set = new HashSet<Character>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		
		int max = 0;
		String str = sc.next();
		
		for (int i = 0; i < str.length(); i++) {
			nextStr:
			for (int j = i; j < str.length(); j++) {
				for (int k = i; k <= j; k++) {
					if (!set.contains(str.charAt(k)))
						continue nextStr;
				}
				max = Math.max(j - i + 1, max);
			}
		}
		System.out.println(max);
	}

}
