import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        for(int i = 0;i<s.length();i++){
            int j = i;
            int tmp = 0;
            while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            }
        }
        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.next();
        int ans = 0;
        for(int i = 0;i<s.length();i++){
            int j = i;
            int tmp = 0;
            while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        for(int i = 0;i<s.length();i++){
            int j = i;
            int tmp = 0;
            while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        for(int i = 0;i<s.length();i++){
            int j = i;
            int tmp = 0;
            while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            }
        }
        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 int ans = 0; ans 0 for(int i = 0;i<s.length();i++){
            int j = i;
            int tmp = 0;
            while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            }
        } int i = 0; int i = 0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            int j = i;
            int tmp = 0;
            while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            }
        } {
            int j = i;
            int tmp = 0;
            while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            }
        } int j = i; j i int tmp = 0; tmp 0 while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            } j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T') j!=s.length() j s.length() s.length s (s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T') s.charAt(j)=='G' s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T' s.charAt(j)=='A' s.charAt(j) s.charAt s j 'A' s.charAt(j)=='C' s.charAt(j) s.charAt s j 'C' s.charAt(j)=='G' s.charAt(j) s.charAt s j 'G' s.charAt(j)=='T' s.charAt(j) s.charAt s j 'T' {
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            } tmp ++ tmp ans = Math.max(ans,tmp) ans Math.max(ans,tmp) Math.max Math ans tmp j++ j 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.next();
        int ans = 0;
        for(int i = 0;i<s.length();i++){
            int j = i;
            int tmp = 0;
            while(j!=s.length()&&(s.charAt(j)=='A'||s.charAt(j)=='C'||s.charAt(j)=='G'||s.charAt(j)=='T')){
                tmp ++;
                ans = Math.max(ans,tmp);
                j++;
            }
        }
        System.out.println(ans);
    }
}