import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String[] input = sc.next().split("");
		List<String> acgt = new ArrayList<>();
		acgt.add("A");
		acgt.add("C");
		acgt.add("G");
		acgt.add("T");
		int res = 0;
		int resTmp = 0;
		for (String string : input) {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		}
		if (resTmp > res) {
			res = resTmp;
		}

		System.out.println(res);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String[] input = sc.next().split("");
		List<String> acgt = new ArrayList<>();
		acgt.add("A");
		acgt.add("C");
		acgt.add("G");
		acgt.add("T");
		int res = 0;
		int resTmp = 0;
		for (String string : input) {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		}
		if (resTmp > res) {
			res = resTmp;
		}

		System.out.println(res);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String[] input = sc.next().split("");
		List<String> acgt = new ArrayList<>();
		acgt.add("A");
		acgt.add("C");
		acgt.add("G");
		acgt.add("T");
		int res = 0;
		int resTmp = 0;
		for (String string : input) {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		}
		if (resTmp > res) {
			res = resTmp;
		}

		System.out.println(res);
	} main {
		Scanner sc = new Scanner(System.in);
		String[] input = sc.next().split("");
		List<String> acgt = new ArrayList<>();
		acgt.add("A");
		acgt.add("C");
		acgt.add("G");
		acgt.add("T");
		int res = 0;
		int resTmp = 0;
		for (String string : input) {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		}
		if (resTmp > res) {
			res = resTmp;
		}

		System.out.println(res);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] input = sc.next().split(""); input sc.next().split("") sc.next().split sc.next() sc.next sc "" List<String> acgt = new ArrayList<>(); acgt new ArrayList<>() acgt.add("A") acgt.add acgt "A" acgt.add("C") acgt.add acgt "C" acgt.add("G") acgt.add acgt "G" acgt.add("T") acgt.add acgt "T" int res = 0; res 0 int resTmp = 0; resTmp 0 for (String string : input) {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		} String string input {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		} {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		} if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			} acgt.contains(string) acgt.contains acgt string {
				resTmp++;
			} resTmp++ resTmp {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			} if (resTmp > res) {
					res = resTmp;
				} resTmp > res resTmp res {
					res = resTmp;
				} res = resTmp res resTmp resTmp = 0 resTmp 0 if (resTmp > res) {
			res = resTmp;
		} resTmp > res resTmp res {
			res = resTmp;
		} res = resTmp res resTmp System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String[] input = sc.next().split("");
		List<String> acgt = new ArrayList<>();
		acgt.add("A");
		acgt.add("C");
		acgt.add("G");
		acgt.add("T");
		int res = 0;
		int resTmp = 0;
		for (String string : input) {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		}
		if (resTmp > res) {
			res = resTmp;
		}

		System.out.println(res);
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String[] input = sc.next().split("");
		List<String> acgt = new ArrayList<>();
		acgt.add("A");
		acgt.add("C");
		acgt.add("G");
		acgt.add("T");
		int res = 0;
		int resTmp = 0;
		for (String string : input) {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		}
		if (resTmp > res) {
			res = resTmp;
		}

		System.out.println(res);
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String[] input = sc.next().split("");
		List<String> acgt = new ArrayList<>();
		acgt.add("A");
		acgt.add("C");
		acgt.add("G");
		acgt.add("T");
		int res = 0;
		int resTmp = 0;
		for (String string : input) {
			if (acgt.contains(string)) {
				resTmp++;
			} else {
				if (resTmp > res) {
					res = resTmp;
				}
				resTmp = 0;
			}
		}
		if (resTmp > res) {
			res = resTmp;
		}

		System.out.println(res);
	}
}
