import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();


		int count = 0;
		for(int i = 0; i <= S.length(); i++) {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		}

		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();


		int count = 0;
		for(int i = 0; i <= S.length(); i++) {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		}

		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();


		int count = 0;
		for(int i = 0; i <= S.length(); i++) {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		}

		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();


		int count = 0;
		for(int i = 0; i <= S.length(); i++) {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		}

		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc int count = 0; count 0 for(int i = 0; i <= S.length(); i++) {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		} int i = 0; int i = 0; i 0 i <= S.length() i S.length() S.length S i++ i++ i {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		} {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		} int tmpCount = 0; tmpCount 0 for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			} int j = i + 1; int j = i + 1; j i + 1 i 1 j <= S.length() j S.length() S.length S j++ j++ j {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			} {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			} String tmp = S.substring(i, j); tmp S.substring(i, j) S.substring S i j int num = tmp.length() - 1; num tmp.length() - 1 tmp.length() tmp.length tmp 1 if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				} tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T") tmp.substring(num).equals("G") tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T") tmp.substring(num).equals("A") tmp.substring(num).equals tmp.substring(num) tmp.substring tmp num "A" tmp.substring(num).equals("C") tmp.substring(num).equals tmp.substring(num) tmp.substring tmp num "C" tmp.substring(num).equals("G") tmp.substring(num).equals tmp.substring(num) tmp.substring tmp num "G" tmp.substring(num).equals("T") tmp.substring(num).equals tmp.substring(num) tmp.substring tmp num "T" {
					tmpCount++;
				} tmpCount++ tmpCount {
					break;
				} break; if(count < tmpCount) count = tmpCount; count < tmpCount count tmpCount count = tmpCount count tmpCount System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();


		int count = 0;
		for(int i = 0; i <= S.length(); i++) {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		}

		System.out.println(count);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();


		int count = 0;
		for(int i = 0; i <= S.length(); i++) {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		}

		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();


		int count = 0;
		for(int i = 0; i <= S.length(); i++) {
			int tmpCount = 0;
			for(int j = i + 1; j <= S.length(); j++) {
				String tmp = S.substring(i, j);
				int num = tmp.length() - 1;
				if(tmp.substring(num).equals("A") || tmp.substring(num).equals("C") || tmp.substring(num).equals("G") || tmp.substring(num).equals("T")) {
					tmpCount++;
				}else {
					break;
				}
			}
			if(count < tmpCount) count = tmpCount;
		}

		System.out.println(count);
	}
}