
import java.util.Scanner;

public class Main {

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

        int ans = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        }

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

        int ans = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        }

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        scan.close();

        int ans = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        }

        System.out.println(ans);
    } main {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        scan.close();

        int ans = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        }

        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan scan.close() scan.close scan int ans = 0; ans 0 for (int i = 0; i < s.length(); i++) {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        } {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        } for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            } int j = i+1; int j = i+1; j i+1 i 1 j <= s.length() j s.length() s.length s j++ j++ j {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            } {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            } String a = s.substring(i, j); a s.substring(i, j) s.substring s i j boolean isOK = true; isOK true for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                } int k = 0; int k = 0; k 0 k < a.length() k a.length() a.length a k++ k++ k {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                } {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                } char c = a.charAt(k); c a.charAt(k) a.charAt a k if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    } 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' {
                        isOK = false;
                        break;
                    } isOK = false isOK false break; if (isOK) {
                    ans = Math.max(ans, a.length());
                } isOK {
                    ans = Math.max(ans, a.length());
                } ans = Math.max(ans, a.length()) ans Math.max(ans, a.length()) Math.max Math ans a.length() a.length a System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

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

        int ans = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        }

        System.out.println(ans);
    }
} public class Main {

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

        int ans = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        }

        System.out.println(ans);
    }
} Main

import java.util.Scanner;

public class Main {

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

        int ans = 0;
        for (int i = 0; i < s.length(); i++) {
            for (int j = i+1; j <= s.length(); j++) {
                String a = s.substring(i, j);
                boolean isOK = true;
                for (int k = 0; k < a.length(); k++) {
                    char c = a.charAt(k);
                    if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                        isOK = false;
                        break;
                    }
                }
                if (isOK) {
                    ans = Math.max(ans, a.length());
                }
            }
        }

        System.out.println(ans);
    }
}
