import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] s = S.split("");
        int len = 0;
        StringBuilder sb = new StringBuilder();
        for(int i=0; i<s.length; i++) {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        }
        
        System.out.println(len);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] s = S.split("");
        int len = 0;
        StringBuilder sb = new StringBuilder();
        for(int i=0; i<s.length; i++) {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        }
        
        System.out.println(len);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] s = S.split("");
        int len = 0;
        StringBuilder sb = new StringBuilder();
        for(int i=0; i<s.length; i++) {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        }
        
        System.out.println(len);
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] s = S.split("");
        int len = 0;
        StringBuilder sb = new StringBuilder();
        for(int i=0; i<s.length; i++) {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        }
        
        System.out.println(len);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String[] s = S.split(""); s S.split("") S.split S "" int len = 0; len 0 StringBuilder sb = new StringBuilder(); sb new StringBuilder() for(int i=0; i<s.length; i++) {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        } int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        } {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        } if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            } s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T") s[i].equals("G") s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T") s[i].equals("A") s[i].equals s[i] s i "A" s[i].equals("C") s[i].equals s[i] s i "C" s[i].equals("G") s[i].equals s[i] s i "G" s[i].equals("T") s[i].equals s[i] s i "T" {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            } sb.append(s[i]) sb.append sb s[i] s i if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                } i == s.length-1 i s.length-1 s.length s s.length 1 {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                } if(sb.length() > len) {
                        len = sb.length();
                    } sb.length() > len sb.length() sb.length sb len {
                        len = sb.length();
                    } len = sb.length() len sb.length() sb.length sb {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            } if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                } sb.length() > len sb.length() sb.length sb len {
                    len = sb.length();
                    sb = new StringBuilder();
                } len = sb.length() len sb.length() sb.length sb sb = new StringBuilder() sb new StringBuilder() System.out.println(len) System.out.println System.out System System.out len String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] s = S.split("");
        int len = 0;
        StringBuilder sb = new StringBuilder();
        for(int i=0; i<s.length; i++) {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        }
        
        System.out.println(len);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] s = S.split("");
        int len = 0;
        StringBuilder sb = new StringBuilder();
        for(int i=0; i<s.length; i++) {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        }
        
        System.out.println(len);
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String[] s = S.split("");
        int len = 0;
        StringBuilder sb = new StringBuilder();
        for(int i=0; i<s.length; i++) {
            if(s[i].equals("A") || s[i].equals("C") || s[i].equals("G") || s[i].equals("T")) {
                sb.append(s[i]);
                if(i == s.length-1) {
                    if(sb.length() > len) {
                        len = sb.length();
                    }
                }
            }else {
                if(sb.length() > len) {
                    len = sb.length();
                    sb = new StringBuilder();
                }
            }
        }
        
        System.out.println(len);
    }
}