import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

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

        List<Character> list = Arrays.asList('A', 'C', 'G', 'T');

        int ans = 0;
        int candidate = 0;
        for (int i = 0; i < s.length(); i++) {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        }

        System.out.println(ans);
    }

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

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

        List<Character> list = Arrays.asList('A', 'C', 'G', 'T');

        int ans = 0;
        int candidate = 0;
        for (int i = 0; i < s.length(); i++) {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        }

        System.out.println(ans);
    }

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

        List<Character> list = Arrays.asList('A', 'C', 'G', 'T');

        int ans = 0;
        int candidate = 0;
        for (int i = 0; i < s.length(); i++) {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        }

        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();

        List<Character> list = Arrays.asList('A', 'C', 'G', 'T');

        int ans = 0;
        int candidate = 0;
        for (int i = 0; i < s.length(); i++) {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        }

        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc List<Character> list = Arrays.asList('A', 'C', 'G', 'T'); list Arrays.asList('A', 'C', 'G', 'T') Arrays.asList Arrays 'A' 'C' 'G' 'T' int ans = 0; ans 0 int candidate = 0; candidate 0 for (int i = 0; i < s.length(); i++) {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        } {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        } if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            } list.contains(s.charAt(i)) list.contains list s.charAt(i) s.charAt s i {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } candidate++ candidate if (candidate > ans) {
                    ans = candidate;
                } candidate > ans candidate ans {
                    ans = candidate;
                } ans = candidate ans candidate {
                candidate = 0;
            } candidate = 0 candidate 0 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);
        String s = sc.next();
        sc.close();

        List<Character> list = Arrays.asList('A', 'C', 'G', 'T');

        int ans = 0;
        int candidate = 0;
        for (int i = 0; i < s.length(); i++) {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        }

        System.out.println(ans);
    }

} public class Main {

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

        List<Character> list = Arrays.asList('A', 'C', 'G', 'T');

        int ans = 0;
        int candidate = 0;
        for (int i = 0; i < s.length(); i++) {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        }

        System.out.println(ans);
    }

} Main
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

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

        List<Character> list = Arrays.asList('A', 'C', 'G', 'T');

        int ans = 0;
        int candidate = 0;
        for (int i = 0; i < s.length(); i++) {
            if (list.contains(s.charAt(i))) {
                candidate++;
                if (candidate > ans) {
                    ans = candidate;
                }
            } else {
                candidate = 0;
            }
        }

        System.out.println(ans);
    }

}
