import java.util.*;
 
public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	int count = 0;
    	int keep = 0;
    	for (char c : S.toCharArray()) {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	}
    	System.out.println(keep < count ? count : keep);
    }
} import java.util.*; util.* java public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	int count = 0;
    	int keep = 0;
    	for (char c : S.toCharArray()) {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	}
    	System.out.println(keep < count ? count : keep);
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	int count = 0;
    	int keep = 0;
    	for (char c : S.toCharArray()) {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	}
    	System.out.println(keep < count ? count : keep);
    } main {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	int count = 0;
    	int keep = 0;
    	for (char c : S.toCharArray()) {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	}
    	System.out.println(keep < count ? count : keep);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int count = 0; count 0 int keep = 0; keep 0 for (char c : S.toCharArray()) {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	} char c S.toCharArray() S.toCharArray S {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	} {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	} if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		} c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'G' c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'A' c 'A' c == 'C' c 'C' c == 'G' c 'G' c == 'T' c 'T' {
    			count++;
    		} count++ count {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		} if (keep < count) {
    				keep = count;
    			} keep < count keep count {
    				keep = count;
    			} keep = count keep count count = 0 count 0 System.out.println(keep < count ? count : keep) System.out.println System.out System System.out keep < count ? count : keep keep < count keep count count keep String[] args args public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	int count = 0;
    	int keep = 0;
    	for (char c : S.toCharArray()) {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	}
    	System.out.println(keep < count ? count : keep);
    }
} public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	int count = 0;
    	int keep = 0;
    	for (char c : S.toCharArray()) {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	}
    	System.out.println(keep < count ? count : keep);
    }
} Main
import java.util.*;
 
public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	int count = 0;
    	int keep = 0;
    	for (char c : S.toCharArray()) {
    		if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
    			count++;
    		} else {
    			if (keep < count) {
    				keep = count;
    			}
    			count = 0;
    		}
    	}
    	System.out.println(keep < count ? count : keep);
    }
}