import java.util.Scanner;

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

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        }
    } try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        } {
            String S = in.next();

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) String S = in.next(); S in.next() in.next in int N = S.length(); N S.length() S.length S boolean[] isATCG = new boolean[N]; isATCG new boolean[N] N for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            } {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            } char c = S.charAt(i); c S.charAt(i) S.charAt S i isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G' isATCG[i] isATCG i c == 'A' || c == 'T' || c == 'C' || c == 'G' c == 'C' c == 'A' || c == 'T' || c == 'C' || c == 'G' c == 'A' c 'A' c == 'T' c 'T' c == 'C' c 'C' c == 'G' c 'G' int max = 0; max 0 int count = 0; count 0 for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            } {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            } if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                } isATCG[i] isATCG i {
                    count++;
                    max = Math.max(max, count);
                } count++ count max = Math.max(max, count) max Math.max(max, count) Math.max Math max count {
                    count = 0;
                } count = 0 count 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        }
    }
} Main
import java.util.Scanner;

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

            int N = S.length();

            boolean[] isATCG = new boolean[N];
            for (int i = 0; i < N; i++) {
                char c = S.charAt(i);
                isATCG[i] = c == 'A' || c == 'T' || c == 'C' || c == 'G';
            }

            int max = 0;
            int count = 0;
            for (int i = 0; i < N; i++) {
                if (isATCG[i]) {
                    count++;
                    max = Math.max(max, count);
                } else {
                    count = 0;
                }
            }
            System.out.println(max);
        }
    }
}
