import java.util.Scanner;

// 18
public class Main{

    public static void main(String[] args) {
        String s = (new Scanner(System.in)).next();
        char[] acgt = {'A', 'C', 'G', 'T'};

        int ans = 0;
        int tmp1 = 0;
        for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        }
        ans = Math.max(ans, tmp1);

        System.out.println(ans);
    }

} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args) {
        String s = (new Scanner(System.in)).next();
        char[] acgt = {'A', 'C', 'G', 'T'};

        int ans = 0;
        int tmp1 = 0;
        for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        }
        ans = Math.max(ans, tmp1);

        System.out.println(ans);
    }

} Main public static void main(String[] args) {
        String s = (new Scanner(System.in)).next();
        char[] acgt = {'A', 'C', 'G', 'T'};

        int ans = 0;
        int tmp1 = 0;
        for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        }
        ans = Math.max(ans, tmp1);

        System.out.println(ans);
    } main {
        String s = (new Scanner(System.in)).next();
        char[] acgt = {'A', 'C', 'G', 'T'};

        int ans = 0;
        int tmp1 = 0;
        for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        }
        ans = Math.max(ans, tmp1);

        System.out.println(ans);
    } String s = (new Scanner(System.in)).next(); s (new Scanner(System.in)).next() (new Scanner(System.in)).next (new Scanner(System.in)) char[] acgt = {'A', 'C', 'G', 'T'}; acgt {'A', 'C', 'G', 'T'} 'A' 'C' 'G' 'T' int ans = 0; ans 0 int tmp1 = 0; tmp1 0 for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        } {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        } int tmp2 = tmp1; tmp2 tmp1 for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            } int j = 0; int j = 0; j 0 j < acgt.length j acgt.length acgt acgt.length j++ j++ j {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            } {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            } if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                } s.charAt(i) == acgt[j] s.charAt(i) s.charAt s i acgt[j] acgt j {
                    ++tmp1;
                    break;
                } ++tmp1 tmp1 break; if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            } tmp1 == tmp2 tmp1 tmp2 {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            } ans = Math.max(ans, tmp1) ans Math.max(ans, tmp1) Math.max Math ans tmp1 tmp1 = 0 tmp1 0 ans = Math.max(ans, tmp1) ans Math.max(ans, tmp1) Math.max Math ans tmp1 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) {
        String s = (new Scanner(System.in)).next();
        char[] acgt = {'A', 'C', 'G', 'T'};

        int ans = 0;
        int tmp1 = 0;
        for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        }
        ans = Math.max(ans, tmp1);

        System.out.println(ans);
    }

} public class Main{

    public static void main(String[] args) {
        String s = (new Scanner(System.in)).next();
        char[] acgt = {'A', 'C', 'G', 'T'};

        int ans = 0;
        int tmp1 = 0;
        for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        }
        ans = Math.max(ans, tmp1);

        System.out.println(ans);
    }

} Main
import java.util.Scanner;

// 18
public class Main{

    public static void main(String[] args) {
        String s = (new Scanner(System.in)).next();
        char[] acgt = {'A', 'C', 'G', 'T'};

        int ans = 0;
        int tmp1 = 0;
        for(int i = 0; i < s.length(); i++) {
            int tmp2 = tmp1;
            for(int j = 0; j < acgt.length; j++) {
                if(s.charAt(i) == acgt[j]) {
                    ++tmp1;
                    break;
                }
            }
            if(tmp1 == tmp2) {
                ans = Math.max(ans, tmp1);
                tmp1 = 0;
            }
        }
        ans = Math.max(ans, tmp1);

        System.out.println(ans);
    }

}
