import java.util.Scanner;

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

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < S.length(); ++i) {
            char s = S.charAt(i);
            if (s == 'A' || s == 'G' || s == 'T' || s == 'C') {
                ans = Math.max(ans, ++tmp);
            } else {
                tmp = 0;
            }
        }

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        scanner.close();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < S.length(); ++i) {
            char s = S.charAt(i);
            if (s == 'A' || s == 'G' || s == 'T' || s == 'C') {
                ans = Math.max(ans, ++tmp);
            } else {
                tmp = 0;
            }
        }

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        scanner.close();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < S.length(); ++i) {
            char s = S.charAt(i);
            if (s == 'A' || s == 'G' || s == 'T' || s == 'C') {
                ans = Math.max(ans, ++tmp);
            } else {
                tmp = 0;
            }
        }

        System.out.println(ans);
    } main {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        scanner.close();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < S.length(); ++i) {
            char s = S.charAt(i);
            if (s == 'A' || s == 'G' || s == 'T' || s == 'C') {
                ans = Math.max(ans, ++tmp);
            } else {
                tmp = 0;
            }
        }

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

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < S.length(); ++i) {
            char s = S.charAt(i);
            if (s == 'A' || s == 'G' || s == 'T' || s == 'C') {
                ans = Math.max(ans, ++tmp);
            } else {
                tmp = 0;
            }
        }

        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        scanner.close();

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < S.length(); ++i) {
            char s = S.charAt(i);
            if (s == 'A' || s == 'G' || s == 'T' || s == 'C') {
                ans = Math.max(ans, ++tmp);
            } else {
                tmp = 0;
            }
        }

        System.out.println(ans);
    }
} Main
import java.util.Scanner;

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

        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < S.length(); ++i) {
            char s = S.charAt(i);
            if (s == 'A' || s == 'G' || s == 'T' || s == 'C') {
                ans = Math.max(ans, ++tmp);
            } else {
                tmp = 0;
            }
        }

        System.out.println(ans);
    }
}