import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		}
	}

	private static int count(char[] chars) {
		int len = chars.length;
		int maxCount = 0;
		int count = 0;
		for (int i = 0; i < len; i++) {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		}
		maxCount = count > maxCount ? count : maxCount;
		return maxCount;
	}

	private static boolean isATGC(char c) {
		return (c == 'A' || c == 'C' || c == 'G' || c == 'T');
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		}
	}

	private static int count(char[] chars) {
		int len = chars.length;
		int maxCount = 0;
		int count = 0;
		for (int i = 0; i < len; i++) {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		}
		maxCount = count > maxCount ? count : maxCount;
		return maxCount;
	}

	private static boolean isATGC(char c) {
		return (c == 'A' || c == 'C' || c == 'G' || c == 'T');
	}
} Main public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		}
	} main {
		try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		}
	} try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		} {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc char[] chars = input.toCharArray(); chars input.toCharArray() input.toCharArray input System.out.println(count(chars)) System.out.println System.out System System.out count(chars) count chars String[] args args private static int count(char[] chars) {
		int len = chars.length;
		int maxCount = 0;
		int count = 0;
		for (int i = 0; i < len; i++) {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		}
		maxCount = count > maxCount ? count : maxCount;
		return maxCount;
	} count {
		int len = chars.length;
		int maxCount = 0;
		int count = 0;
		for (int i = 0; i < len; i++) {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		}
		maxCount = count > maxCount ? count : maxCount;
		return maxCount;
	} int len = chars.length; len chars.length chars chars.length int maxCount = 0; maxCount 0 int count = 0; count 0 for (int i = 0; i < len; i++) {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		} int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		} {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		} if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			} isATGC(chars[i]) isATGC chars[i] chars i {
				count++;
			} count++ count {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			} maxCount = count > maxCount ? count : maxCount maxCount count > maxCount ? count : maxCount count > maxCount count maxCount count maxCount count = 0 count 0 maxCount = count > maxCount ? count : maxCount maxCount count > maxCount ? count : maxCount count > maxCount count maxCount count maxCount return maxCount; maxCount char[] chars chars private static boolean isATGC(char c) {
		return (c == 'A' || c == 'C' || c == 'G' || c == 'T');
	} isATGC {
		return (c == 'A' || c == 'C' || c == 'G' || c == 'T');
	} return (c == 'A' || c == 'C' || c == 'G' || c == 'T'); (c == 'A' || c == 'C' || c == 'G' || c == 'T') c == 'G' c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'A' c 'A' c == 'C' c 'C' c == 'G' c 'G' c == 'T' c 'T' char c c public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		}
	}

	private static int count(char[] chars) {
		int len = chars.length;
		int maxCount = 0;
		int count = 0;
		for (int i = 0; i < len; i++) {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		}
		maxCount = count > maxCount ? count : maxCount;
		return maxCount;
	}

	private static boolean isATGC(char c) {
		return (c == 'A' || c == 'C' || c == 'G' || c == 'T');
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		}
	}

	private static int count(char[] chars) {
		int len = chars.length;
		int maxCount = 0;
		int count = 0;
		for (int i = 0; i < len; i++) {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		}
		maxCount = count > maxCount ? count : maxCount;
		return maxCount;
	}

	private static boolean isATGC(char c) {
		return (c == 'A' || c == 'C' || c == 'G' || c == 'T');
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			System.out.println(count(chars));
		}
	}

	private static int count(char[] chars) {
		int len = chars.length;
		int maxCount = 0;
		int count = 0;
		for (int i = 0; i < len; i++) {
			if (isATGC(chars[i])) {
				count++;
			} else {
				maxCount = count > maxCount ? count : maxCount;
				count = 0;
			}
		}
		maxCount = count > maxCount ? count : maxCount;
		return maxCount;
	}

	private static boolean isATGC(char c) {
		return (c == 'A' || c == 'C' || c == 'G' || c == 'T');
	}
}
