import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;
        int max = 0;
        
        for(int i=0; i<S.length(); i++){
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        }
        
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;
        int max = 0;
        
        for(int i=0; i<S.length(); i++){
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        }
        
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;
        int max = 0;
        
        for(int i=0; i<S.length(); i++){
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        }
        
        System.out.println(max);
    } main {
        
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;
        int max = 0;
        
        for(int i=0; i<S.length(); i++){
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        }
        
        System.out.println(max);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner int count = 0; count 0 int max = 0; max 0 for(int i=0; i<S.length(); i++){
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        } {
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        } if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            } S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T' S.charAt(i)=='C' S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T' S.charAt(i)=='A' S.charAt(i) S.charAt S i 'A' S.charAt(i)=='G' S.charAt(i) S.charAt S i 'G' S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' S.charAt(i)=='T' S.charAt(i) S.charAt S i 'T' {
                count++;
                if(max<=count){
                   max = count; 
                }
            } count++ count if(max<=count){
                   max = count; 
                } max<=count max count {
                   max = count; 
                } max = count max count {
                count = 0;
            } count = 0 count 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;
        int max = 0;
        
        for(int i=0; i<S.length(); i++){
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        }
        
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;
        int max = 0;
        
        for(int i=0; i<S.length(); i++){
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        }
        
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;
        int max = 0;
        
        for(int i=0; i<S.length(); i++){
            if(S.charAt(i)=='A'||S.charAt(i)=='G'||S.charAt(i)=='C'||S.charAt(i)=='T'){
                count++;
                if(max<=count){
                   max = count; 
                }
            }else{
                count = 0;
            }
        }
        
        System.out.println(max);
    }
}
