import java.util.Scanner;

public class Main {
    private static final int MOD = 1_000_000_007;
    private static final String YES = "Yes";
    private static final String NO = "No";

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

        String S = sc.next();


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

    private static int solve(String S) {
        int count = 0;

        for (int i=0; i<S.length(); i++) {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        }

        return count;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static final int MOD = 1_000_000_007;
    private static final String YES = "Yes";
    private static final String NO = "No";

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

        String S = sc.next();


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

    private static int solve(String S) {
        int count = 0;

        for (int i=0; i<S.length(); i++) {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        }

        return count;
    }
} Main private static final int MOD = 1_000_000_007; MOD 1_000_000_007 private static final String YES = "Yes"; YES "Yes" private static final String NO = "No"; NO "No" public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();


        System.out.println(solve(S));
    } main {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();


        System.out.println(solve(S));
    } 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 String[] args args private static int solve(String S) {
        int count = 0;

        for (int i=0; i<S.length(); i++) {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        }

        return count;
    } solve {
        int count = 0;

        for (int i=0; i<S.length(); i++) {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        }

        return count;
    } int count = 0; count 0 for (int i=0; i<S.length(); i++) {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        } {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        } if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            } S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G' S.charAt(i) == 'C' S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G' S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' S.charAt(i) == 'T' S.charAt(i) S.charAt S i 'T' S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' S.charAt(i) == 'G' S.charAt(i) S.charAt S i 'G' {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            } for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                } int j=i; int j=i; j i j<S.length() j S.length() S.length S j++ j++ j {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                } {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                } if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    } S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G' S.charAt(j) == 'C' S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G' S.charAt(j) == 'A' S.charAt(j) S.charAt S j 'A' S.charAt(j) == 'T' S.charAt(j) S.charAt S j 'T' S.charAt(j) == 'C' S.charAt(j) S.charAt S j 'C' S.charAt(j) == 'G' S.charAt(j) S.charAt S j 'G' {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } count = Math.max(count, j-i+1) count Math.max(count, j-i+1) Math.max Math count j-i+1 j-i j i 1 {
                        break;
                    } break; return count; count String S S public class Main {
    private static final int MOD = 1_000_000_007;
    private static final String YES = "Yes";
    private static final String NO = "No";

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

        String S = sc.next();


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

    private static int solve(String S) {
        int count = 0;

        for (int i=0; i<S.length(); i++) {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        }

        return count;
    }
} public class Main {
    private static final int MOD = 1_000_000_007;
    private static final String YES = "Yes";
    private static final String NO = "No";

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

        String S = sc.next();


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

    private static int solve(String S) {
        int count = 0;

        for (int i=0; i<S.length(); i++) {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        }

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

public class Main {
    private static final int MOD = 1_000_000_007;
    private static final String YES = "Yes";
    private static final String NO = "No";

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

        String S = sc.next();


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

    private static int solve(String S) {
        int count = 0;

        for (int i=0; i<S.length(); i++) {
            if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'C' || S.charAt(i) == 'G') {
                for (int j=i; j<S.length(); j++) {
                    if (S.charAt(j) == 'A' || S.charAt(j) == 'T' || S.charAt(j) == 'C' || S.charAt(j) == 'G') {
                        // System.err.println("i=" + i + ", j=" + j + ", val=" + (j-i+1));
                        count = Math.max(count, j-i+1);
                    } else {
                        break;
                    }
                }
            }
        }

        return count;
    }
}