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

public class Main {
	public static void main(String[] args) {
		List<String> listACTG = new ArrayList<String>();
		listACTG.add("A");
		listACTG.add("C");
		listACTG.add("G");
		listACTG.add("T");
		Scanner scanner = new Scanner(System.in);
		String line = scanner.next();
		int maxCount = 0;
		int tmpCount = 0;
		for (int i = 0 ; i < line.length() ; i++) {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		}
		System.out.println(maxCount);
		scanner.close();
	}
} 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) {
		List<String> listACTG = new ArrayList<String>();
		listACTG.add("A");
		listACTG.add("C");
		listACTG.add("G");
		listACTG.add("T");
		Scanner scanner = new Scanner(System.in);
		String line = scanner.next();
		int maxCount = 0;
		int tmpCount = 0;
		for (int i = 0 ; i < line.length() ; i++) {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		}
		System.out.println(maxCount);
		scanner.close();
	}
} Main public static void main(String[] args) {
		List<String> listACTG = new ArrayList<String>();
		listACTG.add("A");
		listACTG.add("C");
		listACTG.add("G");
		listACTG.add("T");
		Scanner scanner = new Scanner(System.in);
		String line = scanner.next();
		int maxCount = 0;
		int tmpCount = 0;
		for (int i = 0 ; i < line.length() ; i++) {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		}
		System.out.println(maxCount);
		scanner.close();
	} main {
		List<String> listACTG = new ArrayList<String>();
		listACTG.add("A");
		listACTG.add("C");
		listACTG.add("G");
		listACTG.add("T");
		Scanner scanner = new Scanner(System.in);
		String line = scanner.next();
		int maxCount = 0;
		int tmpCount = 0;
		for (int i = 0 ; i < line.length() ; i++) {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		}
		System.out.println(maxCount);
		scanner.close();
	} List<String> listACTG = new ArrayList<String>(); listACTG new ArrayList<String>() listACTG.add("A") listACTG.add listACTG "A" listACTG.add("C") listACTG.add listACTG "C" listACTG.add("G") listACTG.add listACTG "G" listACTG.add("T") listACTG.add listACTG "T" Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String line = scanner.next(); line scanner.next() scanner.next scanner int maxCount = 0; maxCount 0 int tmpCount = 0; tmpCount 0 for (int i = 0 ; i < line.length() ; i++) {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		} int i = 0 ; int i = 0 ; i 0 i < line.length() i line.length() line.length line i++ i++ i {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		} {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		} if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        } listACTG.contains(line.substring(i,i+1)) listACTG.contains listACTG line.substring(i,i+1) line.substring line i i+1 i 1 {
	        	tmpCount ++;
	        } tmpCount ++ tmpCount {
	        	tmpCount = 0;
	        } tmpCount = 0 tmpCount 0 if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			} tmpCount >=maxCount tmpCount maxCount {
				maxCount = tmpCount;
			} maxCount = tmpCount maxCount tmpCount System.out.println(maxCount) System.out.println System.out System System.out maxCount scanner.close() scanner.close scanner String[] args args public class Main {
	public static void main(String[] args) {
		List<String> listACTG = new ArrayList<String>();
		listACTG.add("A");
		listACTG.add("C");
		listACTG.add("G");
		listACTG.add("T");
		Scanner scanner = new Scanner(System.in);
		String line = scanner.next();
		int maxCount = 0;
		int tmpCount = 0;
		for (int i = 0 ; i < line.length() ; i++) {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		}
		System.out.println(maxCount);
		scanner.close();
	}
} public class Main {
	public static void main(String[] args) {
		List<String> listACTG = new ArrayList<String>();
		listACTG.add("A");
		listACTG.add("C");
		listACTG.add("G");
		listACTG.add("T");
		Scanner scanner = new Scanner(System.in);
		String line = scanner.next();
		int maxCount = 0;
		int tmpCount = 0;
		for (int i = 0 ; i < line.length() ; i++) {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		}
		System.out.println(maxCount);
		scanner.close();
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		List<String> listACTG = new ArrayList<String>();
		listACTG.add("A");
		listACTG.add("C");
		listACTG.add("G");
		listACTG.add("T");
		Scanner scanner = new Scanner(System.in);
		String line = scanner.next();
		int maxCount = 0;
		int tmpCount = 0;
		for (int i = 0 ; i < line.length() ; i++) {
	        if(listACTG.contains(line.substring(i,i+1))) {
	        	tmpCount ++;
	        }else {
	        	tmpCount = 0;
	        }
			if(tmpCount >=maxCount) {
				maxCount = tmpCount;
			}
		}
		System.out.println(maxCount);
		scanner.close();
	}
}