import java.util.Scanner;

public class Main {

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

		StringBuilder newS = new StringBuilder("");
		for (char x : s.toCharArray()) {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		}

		int max = 0;

		for (String x : newS.toString().split("0")) {
			if (max < x.length()) max = x.length();
		}

		System.out.println(max);
		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();

		StringBuilder newS = new StringBuilder("");
		for (char x : s.toCharArray()) {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		}

		int max = 0;

		for (String x : newS.toString().split("0")) {
			if (max < x.length()) max = x.length();
		}

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

		StringBuilder newS = new StringBuilder("");
		for (char x : s.toCharArray()) {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		}

		int max = 0;

		for (String x : newS.toString().split("0")) {
			if (max < x.length()) max = x.length();
		}

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

		StringBuilder newS = new StringBuilder("");
		for (char x : s.toCharArray()) {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		}

		int max = 0;

		for (String x : newS.toString().split("0")) {
			if (max < x.length()) max = x.length();
		}

		System.out.println(max);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s= sc.next(); s sc.next() sc.next sc StringBuilder newS = new StringBuilder(""); newS new StringBuilder("") for (char x : s.toCharArray()) {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		} char x s.toCharArray() s.toCharArray s {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		} {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		} if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			} x == 'A' || x == 'C' || x == 'G' || x == 'T' x == 'G' x == 'A' || x == 'C' || x == 'G' || x == 'T' x == 'A' x 'A' x == 'C' x 'C' x == 'G' x 'G' x == 'T' x 'T' {
				newS.append(1);
			} newS.append(1) newS.append newS 1 {
				newS.append(0);
			} newS.append(0) newS.append newS 0 int max = 0; max 0 for (String x : newS.toString().split("0")) {
			if (max < x.length()) max = x.length();
		} String x newS.toString().split("0") newS.toString().split newS.toString() newS.toString newS "0" {
			if (max < x.length()) max = x.length();
		} {
			if (max < x.length()) max = x.length();
		} if (max < x.length()) max = x.length(); max < x.length() max x.length() x.length x max = x.length() max x.length() x.length x System.out.println(max) System.out.println System.out System System.out max 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();

		StringBuilder newS = new StringBuilder("");
		for (char x : s.toCharArray()) {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		}

		int max = 0;

		for (String x : newS.toString().split("0")) {
			if (max < x.length()) max = x.length();
		}

		System.out.println(max);
		sc.close();
	}
} public class Main {

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

		StringBuilder newS = new StringBuilder("");
		for (char x : s.toCharArray()) {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		}

		int max = 0;

		for (String x : newS.toString().split("0")) {
			if (max < x.length()) max = x.length();
		}

		System.out.println(max);
		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();

		StringBuilder newS = new StringBuilder("");
		for (char x : s.toCharArray()) {
			if (x == 'A' || x == 'C' || x == 'G' || x == 'T') {
				newS.append(1);
			} else {
				newS.append(0);
			}
		}

		int max = 0;

		for (String x : newS.toString().split("0")) {
			if (max < x.length()) max = x.length();
		}

		System.out.println(max);
		sc.close();
	}
}