import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        //int n = Integer.parseInt(sc.next());
        String s = sc.next();
        boolean[] isDNA = new boolean[s.length()];
        char c = '\0';
        for(int i = 0;i<s.length();i++){
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        }
        int j =0, max=0;
        for(int i = 0;i<isDNA.length;i++){
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        }
        
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        //int n = Integer.parseInt(sc.next());
        String s = sc.next();
        boolean[] isDNA = new boolean[s.length()];
        char c = '\0';
        for(int i = 0;i<s.length();i++){
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        }
        int j =0, max=0;
        for(int i = 0;i<isDNA.length;i++){
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        }
        
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        //int n = Integer.parseInt(sc.next());
        String s = sc.next();
        boolean[] isDNA = new boolean[s.length()];
        char c = '\0';
        for(int i = 0;i<s.length();i++){
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        }
        int j =0, max=0;
        for(int i = 0;i<isDNA.length;i++){
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        }
        
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        
        //int n = Integer.parseInt(sc.next());
        String s = sc.next();
        boolean[] isDNA = new boolean[s.length()];
        char c = '\0';
        for(int i = 0;i<s.length();i++){
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        }
        int j =0, max=0;
        for(int i = 0;i<isDNA.length;i++){
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        }
        
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean[] isDNA = new boolean[s.length()]; isDNA new boolean[s.length()] s.length() s.length s char c = '\0'; c '\0' for(int i = 0;i<s.length();i++){
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        } int i = 0; int i = 0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        } {
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        } c = s.charAt(i) c s.charAt(i) s.charAt s i if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true; (c == 'A')||(c == 'C')||(c == 'G')||(c == 'T') (c == 'G') (c == 'A')||(c == 'C')||(c == 'G')||(c == 'T') (c == 'A') c 'A' (c == 'C') c 'C' (c == 'G') c 'G' (c == 'T') c 'T' isDNA[i] = true isDNA[i] isDNA i true int j =0 j 0 max=0; max 0 for(int i = 0;i<isDNA.length;i++){
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        } int i = 0; int i = 0; i 0 i<isDNA.length i isDNA.length isDNA isDNA.length i++ i++ i {
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        } {
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        } j=i j i while((j<isDNA.length)&&isDNA[j]) j++; (j<isDNA.length)&&isDNA[j] (j<isDNA.length) j isDNA.length isDNA isDNA.length isDNA[j] isDNA j j++ j max = (j-i)>max ? j-i : max max (j-i)>max ? j-i : max (j-i)>max (j-i) j i max j-i j i max 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 sc = new Scanner(System.in);
        
        //int n = Integer.parseInt(sc.next());
        String s = sc.next();
        boolean[] isDNA = new boolean[s.length()];
        char c = '\0';
        for(int i = 0;i<s.length();i++){
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        }
        int j =0, max=0;
        for(int i = 0;i<isDNA.length;i++){
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        }
        
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        //int n = Integer.parseInt(sc.next());
        String s = sc.next();
        boolean[] isDNA = new boolean[s.length()];
        char c = '\0';
        for(int i = 0;i<s.length();i++){
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        }
        int j =0, max=0;
        for(int i = 0;i<isDNA.length;i++){
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        }
        
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        //int n = Integer.parseInt(sc.next());
        String s = sc.next();
        boolean[] isDNA = new boolean[s.length()];
        char c = '\0';
        for(int i = 0;i<s.length();i++){
            c = s.charAt(i);
            if((c == 'A')||(c == 'C')||(c == 'G')||(c == 'T')) isDNA[i] = true;
        }
        int j =0, max=0;
        for(int i = 0;i<isDNA.length;i++){
            j=i;
            while((j<isDNA.length)&&isDNA[j]) j++;
            max = (j-i)>max ? j-i : max;
        }
        
        System.out.println(max);
    }
}