import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        String acgt = "ACGT";
        int ans = 0;
        for(int i = 0; i < S.length; i++) {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        String acgt = "ACGT";
        int ans = 0;
        for(int i = 0; i < S.length; i++) {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        String acgt = "ACGT";
        int ans = 0;
        for(int i = 0; i < S.length; i++) {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        String acgt = "ACGT";
        int ans = 0;
        for(int i = 0; i < S.length; i++) {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] S = sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc String acgt = "ACGT"; acgt "ACGT" int ans = 0; ans 0 for(int i = 0; i < S.length; i++) {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        } int i = 0; int i = 0; i 0 i < S.length i S.length S S.length i++ i++ i {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        } {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        } int c = 0; c 0 for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            } int j = i; int j = i; j i j < S.length j S.length S S.length j++ j++ j {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            } {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            } if(acgt.indexOf(S[j]) == -1) break; acgt.indexOf(S[j]) == -1 acgt.indexOf(S[j]) acgt.indexOf acgt S[j] S j -1 1 break; c++ c ans = Math.max(ans, c) ans Math.max(ans, c) Math.max Math ans c 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 sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        String acgt = "ACGT";
        int ans = 0;
        for(int i = 0; i < S.length; i++) {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        String acgt = "ACGT";
        int ans = 0;
        for(int i = 0; i < S.length; i++) {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        String acgt = "ACGT";
        int ans = 0;
        for(int i = 0; i < S.length; i++) {
            int c = 0;
            for(int j = i; j < S.length; j++) {
                if(acgt.indexOf(S[j]) == -1) break;
                c++;
            }
            ans = Math.max(ans, c);
        }
        System.out.println(ans);
    }
}
