import java.util.*;

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

        int ans = 0;
        int count = 0;
        for (int i = 0; i < S.length(); i++) {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int ans = 0;
        int count = 0;
        for (int i = 0; i < S.length(); i++) {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int ans = 0;
        int count = 0;
        for (int i = 0; i < S.length(); i++) {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int ans = 0;
        int count = 0;
        for (int i = 0; i < S.length(); i++) {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int ans = 0; ans 0 int count = 0; count 0 for (int i = 0; i < S.length(); i++) {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        } {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        } String s = S.charAt(i) + ""; s S.charAt(i) + "" S.charAt(i) S.charAt S i "" if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            } s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") s.equals("G") s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") s.equals("A") s.equals s "A" s.equals("C") s.equals s "C" s.equals("G") s.equals s "G" s.equals("T") s.equals s "T" {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } count++ count if (ans < count) {
                        ans = count;
                    } ans < count ans count {
                        ans = count;
                    } ans = count ans count {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            } if (ans < count) {
                    ans = count;
                } ans < count ans count {
                    ans = count;
                } ans = count ans count count = 0 count 0 System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int ans = 0;
        int count = 0;
        for (int i = 0; i < S.length(); i++) {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();

        int ans = 0;
        int count = 0;
        for (int i = 0; i < S.length(); i++) {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
} Main
import java.util.*;

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

        int ans = 0;
        int count = 0;
        for (int i = 0; i < S.length(); i++) {
            String s = S.charAt(i) + "";
            if (s.equals("A")
                || s.equals("C") 
                || s.equals("G") 
                || s.equals("T") ) {
                    count++;
                    if (ans < count) {
                        ans = count;
                    }
                } else {
                if (ans < count) {
                    ans = count;
                }
                count = 0;
            }
        }
        System.out.println(ans);
        sc.close();
    }
}
