import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int ans = 0;
        int[] acgt = new int[s.length];
        for(int i=0; i<s.length; i++) {
            if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            }
        }
        int cnt = 0;
        for(int i=0; i<acgt.length; i++) {
            if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            }
            ans = Math.max(cnt,ans);
        }
        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();

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

        int ans = 0;
        int[] acgt = new int[s.length];
        for(int i=0; i<s.length; i++) {
            if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            }
        }
        int cnt = 0;
        for(int i=0; i<acgt.length; i++) {
            if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            }
            ans = Math.max(cnt,ans);
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int ans = 0;
        int[] acgt = new int[s.length];
        for(int i=0; i<s.length; i++) {
            if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            }
        }
        int cnt = 0;
        for(int i=0; i<acgt.length; i++) {
            if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            }
            ans = Math.max(cnt,ans);
        }
        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 int ans = 0; ans 0 int[] acgt = new int[s.length]; acgt new int[s.length] s.length s s.length for(int i=0; i<s.length; i++) {
            if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            }
        } int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
            if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            }
        } {
            if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            }
        } if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            } s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T' s[i] == 'G' s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T' s[i] == 'A' s[i] s i 'A' s[i] == 'C' s[i] s i 'C' s[i] == 'G' s[i] s i 'G' s[i] == 'T' s[i] s i 'T' {
                acgt[i] = 1;
            } acgt[i] = 1 acgt[i] acgt i 1 int cnt = 0; cnt 0 for(int i=0; i<acgt.length; i++) {
            if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            }
            ans = Math.max(cnt,ans);
        } int i=0; int i=0; i 0 i<acgt.length i acgt.length acgt acgt.length i++ i++ i {
            if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            }
            ans = Math.max(cnt,ans);
        } {
            if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            }
            ans = Math.max(cnt,ans);
        } if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            } acgt[i] == 1 acgt[i] acgt i 1 {
                cnt += 1;
            } cnt += 1 cnt 1 {
                cnt = 0;
            } cnt = 0 cnt 0 ans = Math.max(cnt,ans) ans Math.max(cnt,ans) Math.max Math cnt ans 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();

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

        int ans = 0;
        int[] acgt = new int[s.length];
        for(int i=0; i<s.length; i++) {
            if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            }
        }
        int cnt = 0;
        for(int i=0; i<acgt.length; i++) {
            if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            }
            ans = Math.max(cnt,ans);
        }
        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();

        int ans = 0;
        int[] acgt = new int[s.length];
        for(int i=0; i<s.length; i++) {
            if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
                acgt[i] = 1;
            }
        }
        int cnt = 0;
        for(int i=0; i<acgt.length; i++) {
            if(acgt[i] == 1) {
                cnt += 1;
            } else {
                cnt = 0;
            }
            ans = Math.max(cnt,ans);
        }
        System.out.println(ans);
    }
}
