import java.util.Scanner;

public class Main {

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

        final String S = sc.next();

        int max = 0;

        for (int i = 0; i < S.length(); i++) {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        }

        System.out.println(max);
    }

    private static boolean isACGT(final char c) {
        return c == 'A' || c == 'C' || c == 'G' || c == 'T';
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

        final String S = sc.next();

        int max = 0;

        for (int i = 0; i < S.length(); i++) {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        }

        System.out.println(max);
    }

    private static boolean isACGT(final char c) {
        return c == 'A' || c == 'C' || c == 'G' || c == 'T';
    }
} Main public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();

        int max = 0;

        for (int i = 0; i < S.length(); i++) {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        }

        System.out.println(max);
    } main {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();

        int max = 0;

        for (int i = 0; i < S.length(); i++) {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        }

        System.out.println(max);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final String S = sc.next(); S sc.next() sc.next sc int max = 0; max 0 for (int i = 0; i < S.length(); i++) {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        } {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        } int cnt = 0; cnt 0 for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            } int j = i; int j = i; j i j < S.length() j S.length() S.length S j++ j++ j {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            } {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            } final char cj = S.charAt(j); cj S.charAt(j) S.charAt S j if (!isACGT(cj)) {
                    break;
                } !isACGT(cj) isACGT(cj) isACGT cj {
                    break;
                } break; cnt++ cnt max = Math.max(max, cnt) max Math.max(max, cnt) Math.max Math max cnt System.out.println(max) System.out.println System.out System System.out max String[] args args private static boolean isACGT(final char c) {
        return c == 'A' || c == 'C' || c == 'G' || c == 'T';
    } isACGT {
        return c == 'A' || c == 'C' || c == 'G' || c == 'T';
    } return c == 'A' || c == 'C' || c == 'G' || c == 'T'; 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' final char c c public class Main {

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

        final String S = sc.next();

        int max = 0;

        for (int i = 0; i < S.length(); i++) {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        }

        System.out.println(max);
    }

    private static boolean isACGT(final char c) {
        return c == 'A' || c == 'C' || c == 'G' || c == 'T';
    }
} public class Main {

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

        final String S = sc.next();

        int max = 0;

        for (int i = 0; i < S.length(); i++) {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        }

        System.out.println(max);
    }

    private static boolean isACGT(final char c) {
        return c == 'A' || c == 'C' || c == 'G' || c == 'T';
    }
} Main
import java.util.Scanner;

public class Main {

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

        final String S = sc.next();

        int max = 0;

        for (int i = 0; i < S.length(); i++) {
            int cnt = 0;
            for (int j = i; j < S.length(); j++) {
                final char cj = S.charAt(j);
                if (!isACGT(cj)) {
                    break;
                }
                cnt++;
            }
            max = Math.max(max, cnt);
        }

        System.out.println(max);
    }

    private static boolean isACGT(final char c) {
        return c == 'A' || c == 'C' || c == 'G' || c == 'T';
    }
}
