import java.io.PrintWriter;
import java.util.*;

public class Main{


    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        PrintWriter out=new PrintWriter(System.out);

        String s=sc.next();
        int n=s.length();
        int ans=0;
        int count=0;
        for (int i = 0; i <n ; i++) {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        }
        if(count>ans)ans=count;
        out.println(ans);

        out.close();
    }

    static boolean f(char a){
        if(a=='A' || a=='C' || a=='G' || a=='T')return true;
        else return false;
    }



} import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main{


    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        PrintWriter out=new PrintWriter(System.out);

        String s=sc.next();
        int n=s.length();
        int ans=0;
        int count=0;
        for (int i = 0; i <n ; i++) {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        }
        if(count>ans)ans=count;
        out.println(ans);

        out.close();
    }

    static boolean f(char a){
        if(a=='A' || a=='C' || a=='G' || a=='T')return true;
        else return false;
    }



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

        String s=sc.next();
        int n=s.length();
        int ans=0;
        int count=0;
        for (int i = 0; i <n ; i++) {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        }
        if(count>ans)ans=count;
        out.println(ans);

        out.close();
    } main {
        Scanner sc=new Scanner(System.in);
        PrintWriter out=new PrintWriter(System.out);

        String s=sc.next();
        int n=s.length();
        int ans=0;
        int count=0;
        for (int i = 0; i <n ; i++) {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        }
        if(count>ans)ans=count;
        out.println(ans);

        out.close();
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) PrintWriter out=new PrintWriter(System.out); out new PrintWriter(System.out) String s=sc.next(); s sc.next() sc.next sc int n=s.length(); n s.length() s.length s int ans=0; ans 0 int count=0; count 0 for (int i = 0; i <n ; i++) {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        } int i = 0; int i = 0; i 0 i <n i n i++ i++ i {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        } {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        } if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            } f(s.charAt(i)) f s.charAt(i) s.charAt s i {
                count++;
                if(ans<count)ans=count;
            } count++ count if(ans<count)ans=count; ans<count ans count ans=count ans count {
                count=0;
            } count=0 count 0 if(count>ans)ans=count; count>ans count ans ans=count ans count out.println(ans) out.println out ans out.close() out.close out String[] args args static boolean f(char a){
        if(a=='A' || a=='C' || a=='G' || a=='T')return true;
        else return false;
    } f {
        if(a=='A' || a=='C' || a=='G' || a=='T')return true;
        else return false;
    } if(a=='A' || a=='C' || a=='G' || a=='T')return true;
        else return false; a=='A' || a=='C' || a=='G' || a=='T' a=='G' a=='A' || a=='C' || a=='G' || a=='T' a=='A' a 'A' a=='C' a 'C' a=='G' a 'G' a=='T' a 'T' return true; true return false; false char a a public class Main{


    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        PrintWriter out=new PrintWriter(System.out);

        String s=sc.next();
        int n=s.length();
        int ans=0;
        int count=0;
        for (int i = 0; i <n ; i++) {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        }
        if(count>ans)ans=count;
        out.println(ans);

        out.close();
    }

    static boolean f(char a){
        if(a=='A' || a=='C' || a=='G' || a=='T')return true;
        else return false;
    }



} public class Main{


    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        PrintWriter out=new PrintWriter(System.out);

        String s=sc.next();
        int n=s.length();
        int ans=0;
        int count=0;
        for (int i = 0; i <n ; i++) {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        }
        if(count>ans)ans=count;
        out.println(ans);

        out.close();
    }

    static boolean f(char a){
        if(a=='A' || a=='C' || a=='G' || a=='T')return true;
        else return false;
    }



} Main
import java.io.PrintWriter;
import java.util.*;

public class Main{


    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        PrintWriter out=new PrintWriter(System.out);

        String s=sc.next();
        int n=s.length();
        int ans=0;
        int count=0;
        for (int i = 0; i <n ; i++) {
            if(f(s.charAt(i))){
                count++;
                if(ans<count)ans=count;
            }
            else{
                count=0;
            }
        }
        if(count>ans)ans=count;
        out.println(ans);

        out.close();
    }

    static boolean f(char a){
        if(a=='A' || a=='C' || a=='G' || a=='T')return true;
        else return false;
    }



}