import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // int n = Integer.parseInt(sc.next());
        String s = sc.next();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // int n = Integer.parseInt(sc.next());
        String s = sc.next();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // int n = Integer.parseInt(sc.next());
        String s = sc.next();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        // int n = Integer.parseInt(sc.next());
        String s = sc.next();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int ans = 0; ans 0 int tmp = 0; tmp 0 for (int i = 0; i < s.length(); i++) {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        } {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        } if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            } s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals("G") s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals("A") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "A" s.substring(i, i + 1).equals("T") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "T" s.substring(i, i + 1).equals("G") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "G" s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "C" {
                tmp++;
                ans = Math.max(tmp, ans);
            } tmp++ tmp ans = Math.max(tmp, ans) ans Math.max(tmp, ans) Math.max Math tmp ans {
                ans = Math.max(tmp, ans);
                tmp = 0;
            } ans = Math.max(tmp, ans) ans Math.max(tmp, ans) Math.max Math tmp ans tmp = 0 tmp 0 System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // int n = Integer.parseInt(sc.next());
        String s = sc.next();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // int n = Integer.parseInt(sc.next());
        String s = sc.next();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // int n = Integer.parseInt(sc.next());
        String s = sc.next();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.substring(i, i + 1).equals("A") || s.substring(i, i + 1).equals("T")
                    || s.substring(i, i + 1).equals("G") || s.substring(i, i + 1).equals("C")) {
                tmp++;
                ans = Math.max(tmp, ans);
            } else {
                ans = Math.max(tmp, ans);
                tmp = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
}