import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        String[] S = str.split("");
        int Maxcount = 0;
        int count = 0;

        for(int i=0; i<S.length;i++){
            count =0; 
            for(int j=i; j<S.length; j++){
                if("A".equals(S[j]) || "C".equals(S[j]) || "G".equals(S[j]) || "T".equals(S[j])){
                    count ++;
                }else{
                    break;
                }
            }
            Maxcount = Math.max(count, Maxcount);
        }
        System.out.println(Maxcount);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        String[] S = str.split("");
        int Maxcount = 0;
        int count = 0;

        for(int i=0; i<S.length;i++){
            count =0; 
            for(int j=i; j<S.length; j++){
                if("A".equals(S[j]) || "C".equals(S[j]) || "G".equals(S[j]) || "T".equals(S[j])){
                    count ++;
                }else{
                    break;
                }
            }
            Maxcount = Math.max(count, Maxcount);
        }
        System.out.println(Maxcount);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        String[] S = str.split("");
        int Maxcount = 0;
        int count = 0;

        for(int i=0; i<S.length;i++){
            count =0; 
            for(int j=i; j<S.length; j++){
                if("A".equals(S[j]) || "C".equals(S[j]) || "G".equals(S[j]) || "T".equals(S[j])){
                    count ++;
                }else{
                    break;
                }
            }
            Maxcount = Math.max(count, Maxcount);
        }
        System.out.println(Maxcount);
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        String[] S = str.split("");
        int Maxcount = 0;
        int count = 0;

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

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

        for(int i=0; i<S.length;i++){
            count =0; 
            for(int j=i; j<S.length; j++){
                if("A".equals(S[j]) || "C".equals(S[j]) || "G".equals(S[j]) || "T".equals(S[j])){
                    count ++;
                }else{
                    break;
                }
            }
            Maxcount = Math.max(count, Maxcount);
        }
        System.out.println(Maxcount);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        String[] S = str.split("");
        int Maxcount = 0;
        int count = 0;

        for(int i=0; i<S.length;i++){
            count =0; 
            for(int j=i; j<S.length; j++){
                if("A".equals(S[j]) || "C".equals(S[j]) || "G".equals(S[j]) || "T".equals(S[j])){
                    count ++;
                }else{
                    break;
                }
            }
            Maxcount = Math.max(count, Maxcount);
        }
        System.out.println(Maxcount);
    }
}