import java.util.Scanner;

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

        String S = sc.next();

        System.out.println(solve(S));

        sc.close();
    }

    static int solve(String S) {
        int result = 0;
        int count = 0;
        for (char ch : S.toCharArray()) {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        }

        return result;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S));

        sc.close();
    }

    static int solve(String S) {
        int result = 0;
        int count = 0;
        for (char ch : S.toCharArray()) {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        }

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

        String S = sc.next();

        System.out.println(solve(S));

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S));

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc System.out.println(solve(S)) System.out.println System.out System System.out solve(S) solve S sc.close() sc.close sc String[] args args static int solve(String S) {
        int result = 0;
        int count = 0;
        for (char ch : S.toCharArray()) {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        }

        return result;
    } solve {
        int result = 0;
        int count = 0;
        for (char ch : S.toCharArray()) {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        }

        return result;
    } int result = 0; result 0 int count = 0; count 0 for (char ch : S.toCharArray()) {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        } char ch S.toCharArray() S.toCharArray S {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        } {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        } if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            } "ATCG".indexOf(ch) >= 0 "ATCG".indexOf(ch) "ATCG".indexOf "ATCG" ch 0 {
                ++count;
                result = Math.max(result, count);
            } ++count count result = Math.max(result, count) result Math.max(result, count) Math.max Math result count {
                count = 0;
            } count = 0 count 0 return result; result String S S public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        System.out.println(solve(S));

        sc.close();
    }

    static int solve(String S) {
        int result = 0;
        int count = 0;
        for (char ch : S.toCharArray()) {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        }

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

        String S = sc.next();

        System.out.println(solve(S));

        sc.close();
    }

    static int solve(String S) {
        int result = 0;
        int count = 0;
        for (char ch : S.toCharArray()) {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        }

        return result;
    }
} Main
import java.util.Scanner;

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

        String S = sc.next();

        System.out.println(solve(S));

        sc.close();
    }

    static int solve(String S) {
        int result = 0;
        int count = 0;
        for (char ch : S.toCharArray()) {
            if ("ATCG".indexOf(ch) >= 0) {
                ++count;
                result = Math.max(result, count);
            } else {
                count = 0;
            }
        }

        return result;
    }
}