import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int i = 0,
        max = 0;
        for(; i < S.length(); i++){
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        }
        System.out.println(max);
    }

    public static boolean isACGT(String s){
        return s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T");
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int i = 0,
        max = 0;
        for(; i < S.length(); i++){
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        }
        System.out.println(max);
    }

    public static boolean isACGT(String s){
        return s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T");
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int i = 0,
        max = 0;
        for(; i < S.length(); i++){
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int i = 0,
        max = 0;
        for(; i < S.length(); i++){
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int i = 0 i 0 max = 0; max 0 for(; i < S.length(); i++){
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        } ; i < S.length() i S.length() S.length S i++ i++ i {
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        } {
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        } if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            } isACGT(S.substring(i, i+1)) isACGT S.substring(i, i+1) S.substring S i i+1 i 1 {
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            } int length = 0; length 0 for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                } ; i < S.length() i S.length() S.length S i++ i++ i {
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                } {
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                } if(!isACGT(S.substring(i, i+1))){
                        break;
                    } !isACGT(S.substring(i, i+1)) isACGT(S.substring(i, i+1)) isACGT S.substring(i, i+1) S.substring S i i+1 i 1 {
                        break;
                    } break; length++ length if(max < length){
                    max =length;
                } max < length max length {
                    max =length;
                } max =length max length System.out.println(max) System.out.println System.out System System.out max String[] args args public static boolean isACGT(String s){
        return s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T");
    } isACGT {
        return s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T");
    } return s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T"); s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T") s.equals("G") s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T") s.equals("A") s.equals s "A" s.equals("C") s.equals s "C" s.equals("G") s.equals s "G" s.equals("T") s.equals s "T" String s s public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int i = 0,
        max = 0;
        for(; i < S.length(); i++){
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        }
        System.out.println(max);
    }

    public static boolean isACGT(String s){
        return s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T");
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int i = 0,
        max = 0;
        for(; i < S.length(); i++){
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        }
        System.out.println(max);
    }

    public static boolean isACGT(String s){
        return s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T");
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int i = 0,
        max = 0;
        for(; i < S.length(); i++){
            if(isACGT(S.substring(i, i+1))){
                int length = 0;
                for(; i < S.length(); i++){
                    if(!isACGT(S.substring(i, i+1))){
                        break;
                    }
                    length++;
                }
                if(max < length){
                    max =length;
                }
            }
        }
        System.out.println(max);
    }

    public static boolean isACGT(String s){
        return s.equals("A") || s.equals("C") || s.equals("G") || s.equals("T");
    }
}