import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        
        int ans = 0;
        int len = 0;
        for(int i = 0; i  < S.length(); i++){
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        }
        
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        
        int ans = 0;
        int len = 0;
        for(int i = 0; i  < S.length(); i++){
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        
        int ans = 0;
        int len = 0;
        for(int i = 0; i  < S.length(); i++){
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        }
        
        System.out.println(ans);
    } main {
        
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        
        int ans = 0;
        int len = 0;
        for(int i = 0; i  < S.length(); i++){
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        }
        
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int ans = 0; ans 0 int len = 0; len 0 for(int i = 0; i  < S.length(); i++){
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        } int i = 0; int i = 0; i 0 i  < S.length() i S.length() S.length S i++ i++ i {
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        } {
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        } char x = S.charAt(i); x S.charAt(i) S.charAt S i switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            } x case 'A' : 'A' case 'A' : case 'C' : 'C' case 'C' : case 'G' : 'G' case 'G' : case 'T' : 'T' case 'T' : len++ len break; default : default : len = 0 len 0 break; ans = Math.max(ans, len) ans Math.max(ans, len) Math.max Math ans len System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        
        int ans = 0;
        int len = 0;
        for(int i = 0; i  < S.length(); i++){
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        }
        
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        
        int ans = 0;
        int len = 0;
        for(int i = 0; i  < S.length(); i++){
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        }
        
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        
        int ans = 0;
        int len = 0;
        for(int i = 0; i  < S.length(); i++){
            char x = S.charAt(i);
            
            switch(x){
                case 'A' :
                case 'C' :
                case 'G' :
                case 'T' :
                    len++;
                    break;                    
                default :
                    len = 0;
                    break;
            }
            
            ans = Math.max(ans, len);
        }
        
        System.out.println(ans);
    }
}
