import java.util.Scanner;

public class Main {

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

		String s = sc.next();

		int maxLength = 0;
		int length = 0;

		for (int i = 0; i < s.length(); i++) {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		}

		System.out.println(maxLength);

		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 maxLength = 0;
		int length = 0;

		for (int i = 0; i < s.length(); i++) {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		}

		System.out.println(maxLength);

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

		String s = sc.next();

		int maxLength = 0;
		int length = 0;

		for (int i = 0; i < s.length(); i++) {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		}

		System.out.println(maxLength);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		int maxLength = 0;
		int length = 0;

		for (int i = 0; i < s.length(); i++) {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		}

		System.out.println(maxLength);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int maxLength = 0; maxLength 0 int length = 0; length 0 for (int i = 0; i < s.length(); i++) {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		} {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		} char c = s.charAt(i); c s.charAt(i) s.charAt s i switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			} c case 'A': 'A' case 'A': case 'C': 'C' case 'C': case 'G': 'G' case 'G': case 'T': 'T' case 'T': length++ length break; default: default: length = 0 length 0 break; if (length > maxLength) {
				maxLength = length;
			} length > maxLength length maxLength {
				maxLength = length;
			} maxLength = length maxLength length System.out.println(maxLength) System.out.println System.out System System.out maxLength 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 maxLength = 0;
		int length = 0;

		for (int i = 0; i < s.length(); i++) {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		}

		System.out.println(maxLength);

		sc.close();
	}
} public class Main {

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

		String s = sc.next();

		int maxLength = 0;
		int length = 0;

		for (int i = 0; i < s.length(); i++) {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		}

		System.out.println(maxLength);

		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 maxLength = 0;
		int length = 0;

		for (int i = 0; i < s.length(); i++) {

			char c = s.charAt(i);

			switch (c) {
			case 'A':
			case 'C':
			case 'G':
			case 'T':
				length++;
				break;
			default:
				length = 0;
				break;
			}

			if (length > maxLength) {
				maxLength = length;
			}
		}

		System.out.println(maxLength);

		sc.close();
	}
}
