import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		int count = 0;
		//		String[] atgc = {"A", "T", "G", "C"};

		for (int i = 0; i < s.length(); i++) {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		}

		System.out.print(count);
		sc.close();
	}
} 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();
		int count = 0;
		//		String[] atgc = {"A", "T", "G", "C"};

		for (int i = 0; i < s.length(); i++) {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		}

		System.out.print(count);
		sc.close();
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		int count = 0;
		//		String[] atgc = {"A", "T", "G", "C"};

		for (int i = 0; i < s.length(); i++) {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		}

		System.out.print(count);
		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		int count = 0;
		//		String[] atgc = {"A", "T", "G", "C"};

		for (int i = 0; i < s.length(); i++) {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		}

		System.out.print(count);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count = 0; count 0 for (int i = 0; i < s.length(); i++) {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				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;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		} {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		} int tmpCount = 0; tmpCount 0 while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			} s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals("G") s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals("A") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "A" s.substring(i, i + 1).equals("T") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "T" s.substring(i, i + 1).equals("G") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "G" s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "C" {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			} tmpCount++ tmpCount if (i == s.length() - 1) {
					break;
				} i == s.length() - 1 i s.length() - 1 s.length() s.length s 1 {
					break;
				} break; i++ i if (tmpCount > count) {
				count = tmpCount;

			} tmpCount > count tmpCount count {
				count = tmpCount;

			} count = tmpCount count tmpCount System.out.print(count) System.out.print System.out System System.out count sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		int count = 0;
		//		String[] atgc = {"A", "T", "G", "C"};

		for (int i = 0; i < s.length(); i++) {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		}

		System.out.print(count);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		int count = 0;
		//		String[] atgc = {"A", "T", "G", "C"};

		for (int i = 0; i < s.length(); i++) {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		}

		System.out.print(count);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		int count = 0;
		//		String[] atgc = {"A", "T", "G", "C"};

		for (int i = 0; i < s.length(); i++) {
			int tmpCount = 0;
			while (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T") ||
					s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
				tmpCount++;
				if (i == s.length() - 1) {
					break;
				}
				i++;

			}
			if (tmpCount > count) {
				count = tmpCount;

			}
		}

		System.out.print(count);
		sc.close();
	}
}