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

public class Main {
	public static void main(String[] args) {
		Set<Character> set = new HashSet<>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int max = 0;
		for (int i = 0; i < S.length(); i++) {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		}
		System.out.println(max);
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
	public static void main(String[] args) {
		Set<Character> set = new HashSet<>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int max = 0;
		for (int i = 0; i < S.length(); i++) {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		}
		System.out.println(max);
	}
} Main public static void main(String[] args) {
		Set<Character> set = new HashSet<>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int max = 0;
		for (int i = 0; i < S.length(); i++) {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		}
		System.out.println(max);
	} main {
		Set<Character> set = new HashSet<>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int max = 0;
		for (int i = 0; i < S.length(); i++) {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		}
		System.out.println(max);
	} Set<Character> set = new HashSet<>(); set new HashSet<>() 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' Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int max = 0; max 0 for (int i = 0; i < S.length(); i++) {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		} {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		} int tmp = 0; tmp 0 for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			} int j = i; int j = i; j i j < S.length() j S.length() S.length S j++ j++ j {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			} {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			} if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				} set.contains(S.charAt(j)) set.contains set S.charAt(j) S.charAt S j {
					tmp++;
				} tmp++ tmp {
					break;
				} break; max = Math.max(max, tmp) max Math.max(max, tmp) Math.max Math max tmp 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) {
		Set<Character> set = new HashSet<>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int max = 0;
		for (int i = 0; i < S.length(); i++) {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		}
		System.out.println(max);
	}
} public class Main {
	public static void main(String[] args) {
		Set<Character> set = new HashSet<>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int max = 0;
		for (int i = 0; i < S.length(); i++) {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		}
		System.out.println(max);
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Set<Character> set = new HashSet<>();
		set.add('A');
		set.add('C');
		set.add('G');
		set.add('T');
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int max = 0;
		for (int i = 0; i < S.length(); i++) {
			int tmp = 0;
			for (int j = i; j < S.length(); j++) {
				if (set.contains(S.charAt(j))) {
					tmp++;
				} else {
					break;
				}
			}
			max = Math.max(max, tmp);
		}
		System.out.println(max);
	}
}