
import java.util.Scanner;


public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        
        int c = 0;
        int maxC = 0;
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        }
        
        System.out.println(maxC);
        
    }
    
} import java.util.Scanner; Scanner java.util public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        
        int c = 0;
        int maxC = 0;
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        }
        
        System.out.println(maxC);
        
    }
    
} Main /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        
        int c = 0;
        int maxC = 0;
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        }
        
        System.out.println(maxC);
        
    } main {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        
        int c = 0;
        int maxC = 0;
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        }
        
        System.out.println(maxC);
        
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String str = s.next(); str s.next() s.next s int c = 0; c 0 int maxC = 0; maxC 0 for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i ++ i ++ i {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        } {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        } if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0; str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T' str.charAt(i) == 'G' str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T' str.charAt(i) == 'A' str.charAt(i) str.charAt str i 'A' str.charAt(i) == 'C' str.charAt(i) str.charAt str i 'C' str.charAt(i) == 'G' str.charAt(i) str.charAt str i 'G' str.charAt(i) == 'T' str.charAt(i) str.charAt str i 'T' {
                c ++;
                if (c > maxC)
                    maxC = c;
            } c ++ c if (c > maxC)
                    maxC = c; c > maxC c maxC maxC = c maxC c c = 0 c 0 System.out.println(maxC) System.out.println System.out System System.out maxC String[] args args public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        
        int c = 0;
        int maxC = 0;
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        }
        
        System.out.println(maxC);
        
    }
    
} public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        
        int c = 0;
        int maxC = 0;
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        }
        
        System.out.println(maxC);
        
    }
    
} Main

import java.util.Scanner;


public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        
        int c = 0;
        int maxC = 0;
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) == 'A' || str.charAt(i) == 'C' || str.charAt(i) == 'G' || str.charAt(i) == 'T') {
                c ++;
                if (c > maxC)
                    maxC = c;
            } else
                c = 0;
        }
        
        System.out.println(maxC);
        
    }
    
}
