import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String spt[] =str.split("");
        int count=0;
        int answer =0;
        
        for(int i=0;i<spt.length;i++){
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        }
        if(answer<count){
            answer=count;
        }
        System.out.println(answer);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String spt[] =str.split("");
        int count=0;
        int answer =0;
        
        for(int i=0;i<spt.length;i++){
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        }
        if(answer<count){
            answer=count;
        }
        System.out.println(answer);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String spt[] =str.split("");
        int count=0;
        int answer =0;
        
        for(int i=0;i<spt.length;i++){
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        }
        if(answer<count){
            answer=count;
        }
        System.out.println(answer);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String spt[] =str.split("");
        int count=0;
        int answer =0;
        
        for(int i=0;i<spt.length;i++){
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        }
        if(answer<count){
            answer=count;
        }
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String spt[] =str.split(""); spt str.split("") str.split str "" int count=0; count 0 int answer =0; answer 0 for(int i=0;i<spt.length;i++){
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        } int i=0; int i=0; i 0 i<spt.length i spt.length spt spt.length i++ i++ i {
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        } {
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        } if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            } spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G") spt[i].equals("C") spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G") spt[i].equals("A") spt[i].equals spt[i] spt i "A" spt[i].equals("T") spt[i].equals spt[i] spt i "T" spt[i].equals("C") spt[i].equals spt[i] spt i "C" spt[i].equals("G") spt[i].equals spt[i] spt i "G" {
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            } count+=1 count 1 if(answer<count){
                
                    answer=count;
                } answer<count answer count {
                
                    answer=count;
                } answer=count answer count {
                count =0;
            } count =0 count 0 if(answer<count){
            answer=count;
        } answer<count answer count {
            answer=count;
        } answer=count answer count System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String spt[] =str.split("");
        int count=0;
        int answer =0;
        
        for(int i=0;i<spt.length;i++){
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        }
        if(answer<count){
            answer=count;
        }
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String spt[] =str.split("");
        int count=0;
        int answer =0;
        
        for(int i=0;i<spt.length;i++){
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        }
        if(answer<count){
            answer=count;
        }
        System.out.println(answer);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String spt[] =str.split("");
        int count=0;
        int answer =0;
        
        for(int i=0;i<spt.length;i++){
            if(spt[i].equals("A")||spt[i].equals("T")||spt[i].equals("C")||spt[i].equals("G")){
                count+=1;
                if(answer<count){
                
                    answer=count;
                }
            }else{
                count =0;
            }
            
        }
        if(answer<count){
            answer=count;
        }
        System.out.println(answer);
    }
}
