import java.util.Scanner;
public class Main {

	public void run() throws Exception {
		int anw = 0;
		int num = 0;
		String ACGT = "ACGT";
	    Scanner sc = new Scanner(System.in);
	    char[] cs = sc.next().toCharArray();
	    for(int i=0;i<cs.length;i++){
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    }
	    
	    
	    System.out.println(anw);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

} import java.util.Scanner; Scanner java.util public class Main {

	public void run() throws Exception {
		int anw = 0;
		int num = 0;
		String ACGT = "ACGT";
	    Scanner sc = new Scanner(System.in);
	    char[] cs = sc.next().toCharArray();
	    for(int i=0;i<cs.length;i++){
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    }
	    
	    
	    System.out.println(anw);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

} Main public void run() throws Exception {
		int anw = 0;
		int num = 0;
		String ACGT = "ACGT";
	    Scanner sc = new Scanner(System.in);
	    char[] cs = sc.next().toCharArray();
	    for(int i=0;i<cs.length;i++){
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    }
	    
	    
	    System.out.println(anw);
	} run {
		int anw = 0;
		int num = 0;
		String ACGT = "ACGT";
	    Scanner sc = new Scanner(System.in);
	    char[] cs = sc.next().toCharArray();
	    for(int i=0;i<cs.length;i++){
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    }
	    
	    
	    System.out.println(anw);
	} int anw = 0; anw 0 int num = 0; num 0 String ACGT = "ACGT"; ACGT "ACGT" Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] cs = sc.next().toCharArray(); cs sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc for(int i=0;i<cs.length;i++){
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    } int i=0; int i=0; i 0 i<cs.length i cs.length cs cs.length i++ i++ i {
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    } {
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    } if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	} ACGT.indexOf(cs[i]) != -1 ACGT.indexOf(cs[i]) ACGT.indexOf ACGT cs[i] cs i -1 1 {
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	} num++ num if(num > anw){
	    			anw = num;
	    		} num > anw num anw {
	    			anw = num;
	    		} anw = num anw num {	    		
	    		num = 0;
	    	} num = 0 num 0 System.out.println(anw) System.out.println System.out System System.out anw public static void main(String[] args) throws Exception {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {

	public void run() throws Exception {
		int anw = 0;
		int num = 0;
		String ACGT = "ACGT";
	    Scanner sc = new Scanner(System.in);
	    char[] cs = sc.next().toCharArray();
	    for(int i=0;i<cs.length;i++){
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    }
	    
	    
	    System.out.println(anw);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

} public class Main {

	public void run() throws Exception {
		int anw = 0;
		int num = 0;
		String ACGT = "ACGT";
	    Scanner sc = new Scanner(System.in);
	    char[] cs = sc.next().toCharArray();
	    for(int i=0;i<cs.length;i++){
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    }
	    
	    
	    System.out.println(anw);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

} Main
import java.util.Scanner;
public class Main {

	public void run() throws Exception {
		int anw = 0;
		int num = 0;
		String ACGT = "ACGT";
	    Scanner sc = new Scanner(System.in);
	    char[] cs = sc.next().toCharArray();
	    for(int i=0;i<cs.length;i++){
	    	
	    	if(ACGT.indexOf(cs[i]) != -1){
	    		num++;
	    		if(num > anw){
	    			anw = num;
	    		}
	    	}else{	    		
	    		num = 0;
	    	}
	    }
	    
	    
	    System.out.println(anw);
	}
    public static void main(String[] args) throws Exception {
        new Main().run();
    }

}