import java.util.*;


public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int current = 0;
        int max = 0;
        for(int i = 0 ; i<s.length(); i++){
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        }
        System.out.println(max);

    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int current = 0;
        int max = 0;
        for(int i = 0 ; i<s.length(); i++){
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        }
        System.out.println(max);

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int current = 0;
        int max = 0;
        for(int i = 0 ; i<s.length(); i++){
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        }
        System.out.println(max);

    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int current = 0;
        int max = 0;
        for(int i = 0 ; i<s.length(); i++){
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,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 int current = 0; current 0 int max = 0; max 0 for(int i = 0 ; i<s.length(); i++){
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        } 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);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        } {
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        } char x = s.charAt(i); x s.charAt(i) s.charAt s i if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            } x=='A' || x=='C'|| x=='G'||x=='T' x=='G' x=='A' || x=='C'|| x=='G'||x=='T' x=='A' x 'A' x=='C' x 'C' x=='G' x 'G' x=='T' x 'T' {
                current++;
            } current++ current {
                current = 0;
            } current = 0 current 0 max = Math.max(current,max) max Math.max(current,max) Math.max Math current 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) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int current = 0;
        int max = 0;
        for(int i = 0 ; i<s.length(); i++){
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        }
        System.out.println(max);

    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int current = 0;
        int max = 0;
        for(int i = 0 ; i<s.length(); i++){
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        }
        System.out.println(max);

    }
} Main
import java.util.*;


public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int current = 0;
        int max = 0;
        for(int i = 0 ; i<s.length(); i++){
            char x = s.charAt(i);
            if(x=='A' || x=='C'|| x=='G'||x=='T'){
                current++;
            }else{
                current = 0;
            }
            max = Math.max(current,max);
        }
        System.out.println(max);

    }
}