import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = {'A','C','G','T'};
        int ans = 0;
        int temp = 0;
        boolean flag = false;
        for (int i = 0; i < s.length(); i++) {
            for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            }

        }
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = {'A','C','G','T'};
        int ans = 0;
        int temp = 0;
        boolean flag = false;
        for (int i = 0; i < s.length(); i++) {
            for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            }

        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = {'A','C','G','T'};
        int ans = 0;
        int temp = 0;
        boolean flag = false;
        for (int i = 0; i < s.length(); i++) {
            for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            }

        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = {'A','C','G','T'};
        int ans = 0;
        int temp = 0;
        boolean flag = false;
        for (int i = 0; i < s.length(); i++) {
            for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            }

        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc char[] c = {'A','C','G','T'}; c {'A','C','G','T'} 'A' 'C' 'G' 'T' int ans = 0; ans 0 int temp = 0; temp 0 boolean flag = false; flag false for (int i = 0; i < s.length(); i++) {
            for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            }

        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            }

        } {
            for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            }

        } for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            } int j = 0; int j = 0; j 0 j < c.length j c.length c c.length j++ j++ j {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            } {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            } if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                } s.substring(i, i + 1).equals(String.valueOf(c[j])) s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 String.valueOf(c[j]) String.valueOf String c[j] c j {
                    flag = true;
                    break;
                } flag = true flag true break; if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            } flag {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } temp++ temp flag = false flag false ans = Math.max(ans, temp) ans Math.max(ans, temp) Math.max Math ans temp {
                temp = 0;
            } temp = 0 temp 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] c = {'A','C','G','T'};
        int ans = 0;
        int temp = 0;
        boolean flag = false;
        for (int i = 0; i < s.length(); i++) {
            for (int j = 0; j < c.length; j++) {
                if (s.substring(i, i + 1).equals(String.valueOf(c[j]))) {
                    flag = true;
                    break;
                }
            }
            if (flag) {
                temp++;
                flag = false;
                ans = Math.max(ans, temp);
            } else {
                temp = 0;
            }

        }
        System.out.println(ans);
    }
}