import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int acgtLength = 0;
		int acgtMaxLength = 0;
		String[] acgt = {"A", "C", "G", "T"};
		List<String> acgtList = Arrays.asList(acgt);
		for(int i = 0; i < s.length(); i++) {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		}
		System.out.println(acgtMaxLength);
	}
} import java.util.Arrays; Arrays 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) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int acgtLength = 0;
		int acgtMaxLength = 0;
		String[] acgt = {"A", "C", "G", "T"};
		List<String> acgtList = Arrays.asList(acgt);
		for(int i = 0; i < s.length(); i++) {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		}
		System.out.println(acgtMaxLength);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int acgtLength = 0;
		int acgtMaxLength = 0;
		String[] acgt = {"A", "C", "G", "T"};
		List<String> acgtList = Arrays.asList(acgt);
		for(int i = 0; i < s.length(); i++) {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		}
		System.out.println(acgtMaxLength);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int acgtLength = 0;
		int acgtMaxLength = 0;
		String[] acgt = {"A", "C", "G", "T"};
		List<String> acgtList = Arrays.asList(acgt);
		for(int i = 0; i < s.length(); i++) {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		}
		System.out.println(acgtMaxLength);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int acgtLength = 0; acgtLength 0 int acgtMaxLength = 0; acgtMaxLength 0 String[] acgt = {"A", "C", "G", "T"}; acgt {"A", "C", "G", "T"} "A" "C" "G" "T" List<String> acgtList = Arrays.asList(acgt); acgtList Arrays.asList(acgt) Arrays.asList Arrays acgt for(int i = 0; i < s.length(); i++) {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		} {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		} String tmpStr = s.substring(i, i+1); tmpStr s.substring(i, i+1) s.substring s i i+1 i 1 if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			} acgtList.contains(tmpStr) acgtList.contains acgtList tmpStr {
				acgtLength++;
			} acgtLength++ acgtLength {
				acgtLength = 0;
			} acgtLength = 0 acgtLength 0 if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			} acgtLength > acgtMaxLength acgtLength acgtMaxLength {
				acgtMaxLength = acgtLength;
			} acgtMaxLength = acgtLength acgtMaxLength acgtLength System.out.println(acgtMaxLength) System.out.println System.out System System.out acgtMaxLength String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int acgtLength = 0;
		int acgtMaxLength = 0;
		String[] acgt = {"A", "C", "G", "T"};
		List<String> acgtList = Arrays.asList(acgt);
		for(int i = 0; i < s.length(); i++) {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		}
		System.out.println(acgtMaxLength);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int acgtLength = 0;
		int acgtMaxLength = 0;
		String[] acgt = {"A", "C", "G", "T"};
		List<String> acgtList = Arrays.asList(acgt);
		for(int i = 0; i < s.length(); i++) {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		}
		System.out.println(acgtMaxLength);
	}
} Main
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int acgtLength = 0;
		int acgtMaxLength = 0;
		String[] acgt = {"A", "C", "G", "T"};
		List<String> acgtList = Arrays.asList(acgt);
		for(int i = 0; i < s.length(); i++) {
			String tmpStr = s.substring(i, i+1);
			if(acgtList.contains(tmpStr)) {
				acgtLength++;
			} else {
				acgtLength = 0;
			}
			if(acgtLength > acgtMaxLength) {
				acgtMaxLength = acgtLength;
			}
		}
		System.out.println(acgtMaxLength);
	}
}