import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] cl = sc.next().toCharArray();
        char[] chk = {'A','T','C','G'};
        int ans = 0;
        int now = 0;
        for(int i = 0; i < cl.length; i++){
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(Math.max(ans,now));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] cl = sc.next().toCharArray();
        char[] chk = {'A','T','C','G'};
        int ans = 0;
        int now = 0;
        for(int i = 0; i < cl.length; i++){
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(Math.max(ans,now));
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] cl = sc.next().toCharArray();
        char[] chk = {'A','T','C','G'};
        int ans = 0;
        int now = 0;
        for(int i = 0; i < cl.length; i++){
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(Math.max(ans,now));
    } main {
        Scanner sc = new Scanner(System.in);
        char[] cl = sc.next().toCharArray();
        char[] chk = {'A','T','C','G'};
        int ans = 0;
        int now = 0;
        for(int i = 0; i < cl.length; i++){
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(Math.max(ans,now));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] cl = sc.next().toCharArray(); cl sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc char[] chk = {'A','T','C','G'}; chk {'A','T','C','G'} 'A' 'T' 'C' 'G' int ans = 0; ans 0 int now = 0; now 0 for(int i = 0; i < cl.length; i++){
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        } int i = 0; int i = 0; i 0 i < cl.length i cl.length cl cl.length i++ i++ i {
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        } {
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        } boolean bool = false; bool false for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            } char c chk {
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            } {
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            } if(cl[i] == c){
                    bool = true;
                    break;
                } cl[i] == c cl[i] cl i c {
                    bool = true;
                    break;
                } bool = true bool true break; if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            } bool {
                now++;
            } now++ now {
                ans = Math.max(ans,now);
                now = 0;
            } ans = Math.max(ans,now) ans Math.max(ans,now) Math.max Math ans now now = 0 now 0 System.out.println(Math.max(ans,now)) System.out.println System.out System System.out Math.max(ans,now) Math.max Math ans now String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] cl = sc.next().toCharArray();
        char[] chk = {'A','T','C','G'};
        int ans = 0;
        int now = 0;
        for(int i = 0; i < cl.length; i++){
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(Math.max(ans,now));
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] cl = sc.next().toCharArray();
        char[] chk = {'A','T','C','G'};
        int ans = 0;
        int now = 0;
        for(int i = 0; i < cl.length; i++){
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(Math.max(ans,now));
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] cl = sc.next().toCharArray();
        char[] chk = {'A','T','C','G'};
        int ans = 0;
        int now = 0;
        for(int i = 0; i < cl.length; i++){
            boolean bool = false;
            for(char c: chk){
                if(cl[i] == c){
                    bool = true;
                    break;
                }
            }
            if(bool){
                now++;
            }else{
                ans = Math.max(ans,now);
                now = 0;
            }
        }
        System.out.println(Math.max(ans,now));
    }
}
