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