import java.io.*;
import java.util.Scanner;


public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		String s = sc.next();
		int n = s.length();

		int max = 0;
		for (int i = 0; i < n; i++) {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		}

		pr.println(max);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		String s = sc.next();
		int n = s.length();

		int max = 0;
		for (int i = 0; i < n; i++) {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		}

		pr.println(max);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} Main private static Scanner sc; sc private static Printer pr; pr private static void solve() {
		String s = sc.next();
		int n = s.length();

		int max = 0;
		for (int i = 0; i < n; i++) {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		}

		pr.println(max);
	} solve {
		String s = sc.next();
		int n = s.length();

		int max = 0;
		for (int i = 0; i < n; i++) {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		}

		pr.println(max);
	} String s = sc.next(); s sc.next() sc.next sc int n = s.length(); n s.length() s.length s int max = 0; max 0 for (int i = 0; i < n; i++) {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		} {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		} pr.println(max) pr.println pr max // ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	} main {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	} sc = new Scanner(System.in) sc new Scanner(System.in) pr = new Printer(System.out) pr new Printer(System.out) solve() solve pr.close() pr.close pr sc.close() sc.close sc String[] args args static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	} Printer Printer(OutputStream out) {
			super(out);
		} Printer {
			super(out);
		} super(out) super out OutputStream out out PrintWriter public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		String s = sc.next();
		int n = s.length();

		int max = 0;
		for (int i = 0; i < n; i++) {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		}

		pr.println(max);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		String s = sc.next();
		int n = s.length();

		int max = 0;
		for (int i = 0; i < n; i++) {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		}

		pr.println(max);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
} Main
import java.io.*;
import java.util.Scanner;


public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		String s = sc.next();
		int n = s.length();

		int max = 0;
		for (int i = 0; i < n; i++) {
			out:
			for (int j = i + 1; j <= n; j++) {
				String tmp = s.substring(i, j);
				for (int k = 0, size = tmp.length(); k < size; k++) {
					char c = tmp.charAt(k);
					if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
						continue out;
					}
				}
				max = Math.max(max, tmp.length());
			}
		}

		pr.println(max);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
