import java.util.Scanner;

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

        int max_ans = 0;
        int count = 0;
        for (int i=0; i<word.length(); i++) {
            if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            }
        }
        System.out.print(max_ans);
    }

    public static boolean isATGC(char c) {
        boolean result;
        result = c=='A' || c=='T' || c=='G' || c=='C';
        return result;
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();

        int max_ans = 0;
        int count = 0;
        for (int i=0; i<word.length(); i++) {
            if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            }
        }
        System.out.print(max_ans);
    }

    public static boolean isATGC(char c) {
        boolean result;
        result = c=='A' || c=='T' || c=='G' || c=='C';
        return result;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();

        int max_ans = 0;
        int count = 0;
        for (int i=0; i<word.length(); i++) {
            if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            }
        }
        System.out.print(max_ans);
    } main {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();

        int max_ans = 0;
        int count = 0;
        for (int i=0; i<word.length(); i++) {
            if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            }
        }
        System.out.print(max_ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String word = sc.next(); word sc.next() sc.next sc int max_ans = 0; max_ans 0 int count = 0; count 0 for (int i=0; i<word.length(); i++) {
            if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            }
        } int i=0; int i=0; i 0 i<word.length() i word.length() word.length word i++ i++ i {
            if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            }
        } {
            if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            }
        } if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            } isATGC(word.charAt(i)) isATGC word.charAt(i) word.charAt word i {
                count++;
                max_ans = Math.max(count, max_ans);
            } count++ count max_ans = Math.max(count, max_ans) max_ans Math.max(count, max_ans) Math.max Math count max_ans {
                count = 0;
            } count = 0 count 0 System.out.print(max_ans) System.out.print System.out System System.out max_ans String[] args args public static boolean isATGC(char c) {
        boolean result;
        result = c=='A' || c=='T' || c=='G' || c=='C';
        return result;
    } isATGC {
        boolean result;
        result = c=='A' || c=='T' || c=='G' || c=='C';
        return result;
    } boolean result; result result = c=='A' || c=='T' || c=='G' || c=='C' result c=='A' || c=='T' || c=='G' || c=='C' c=='G' c=='A' || c=='T' || c=='G' || c=='C' c=='A' c 'A' c=='T' c 'T' c=='G' c 'G' c=='C' c 'C' return result; result char c c
import java.util.Scanner;

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

        int max_ans = 0;
        int count = 0;
        for (int i=0; i<word.length(); i++) {
            if (isATGC(word.charAt(i))) {
                count++;
                max_ans = Math.max(count, max_ans);
            } else {
                count = 0;
            }
        }
        System.out.print(max_ans);
    }

    public static boolean isATGC(char c) {
        boolean result;
        result = c=='A' || c=='T' || c=='G' || c=='C';
        return result;
    }
}