
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		
		char[] list = str.toCharArray();
		int count = 0;
		int ans = 0;
		for (char c : list) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		}
		
		System.out.println(ans);
		
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		
		char[] list = str.toCharArray();
		int count = 0;
		int ans = 0;
		for (char c : list) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		}
		
		System.out.println(ans);
		
		scan.close();
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		
		char[] list = str.toCharArray();
		int count = 0;
		int ans = 0;
		for (char c : list) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		}
		
		System.out.println(ans);
		
		scan.close();
	} main {

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		
		char[] list = str.toCharArray();
		int count = 0;
		int ans = 0;
		for (char c : list) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		}
		
		System.out.println(ans);
		
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.next(); str scan.next() scan.next scan char[] list = str.toCharArray(); list str.toCharArray() str.toCharArray str int count = 0; count 0 int ans = 0; ans 0 for (char c : list) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		} char c list {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		} {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		} if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			} 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' {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} count++ count if (ans < count) {
					
					ans = count;
				} ans < count ans count {
					
					ans = count;
				} ans = count ans count {
				count = 0;
			} count = 0 count 0 System.out.println(ans) System.out.println System.out System System.out ans scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		
		char[] list = str.toCharArray();
		int count = 0;
		int ans = 0;
		for (char c : list) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		}
		
		System.out.println(ans);
		
		scan.close();
	}
} public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		
		char[] list = str.toCharArray();
		int count = 0;
		int ans = 0;
		for (char c : list) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		}
		
		System.out.println(ans);
		
		scan.close();
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		
		char[] list = str.toCharArray();
		int count = 0;
		int ans = 0;
		for (char c : list) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				count++;
				if (ans < count) {
					
					ans = count;
				}
			} else {
				count = 0;
			}
		}
		
		System.out.println(ans);
		
		scan.close();
	}
}