import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String s = stdIn.next();

        char [] cs = s.toCharArray();

        int max = 0;
        int temp = 0;
        for(int i=0; i<cs.length; i++){
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        }

        System.out.println(max);
    }

    static boolean isACGT(char c){
        if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
            return true;
        }
        return false;
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String s = stdIn.next();

        char [] cs = s.toCharArray();

        int max = 0;
        int temp = 0;
        for(int i=0; i<cs.length; i++){
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        }

        System.out.println(max);
    }

    static boolean isACGT(char c){
        if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
            return true;
        }
        return false;
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String s = stdIn.next();

        char [] cs = s.toCharArray();

        int max = 0;
        int temp = 0;
        for(int i=0; i<cs.length; i++){
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        }

        System.out.println(max);
    } main {
        Scanner stdIn = new Scanner(System.in);

        String s = stdIn.next();

        char [] cs = s.toCharArray();

        int max = 0;
        int temp = 0;
        for(int i=0; i<cs.length; i++){
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        }

        System.out.println(max);
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String s = stdIn.next(); s stdIn.next() stdIn.next stdIn char [] cs = s.toCharArray(); cs s.toCharArray() s.toCharArray s int max = 0; max 0 int temp = 0; temp 0 for(int i=0; i<cs.length; i++){
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        } int i=0; int i=0; i 0 i<cs.length i cs.length cs cs.length i++ i++ i {
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        } {
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        } if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            } isACGT(cs[i]) isACGT cs[i] cs i {
                temp++;
                if(temp > max){
                    max = temp;
                }
            } temp++ temp if(temp > max){
                    max = temp;
                } temp > max temp max {
                    max = temp;
                } max = temp max temp {
                temp = 0;
            } temp = 0 temp 0 System.out.println(max) System.out.println System.out System System.out max String[] args args static boolean isACGT(char c){
        if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
            return true;
        }
        return false;
    } isACGT {
        if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
            return true;
        }
        return false;
    } if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
            return true;
        } c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'G' c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'A' c 'A' c == 'C' c 'C' c == 'G' c 'G' c == 'T' c 'T' {
            return true;
        } return true; true return false; false char c c public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String s = stdIn.next();

        char [] cs = s.toCharArray();

        int max = 0;
        int temp = 0;
        for(int i=0; i<cs.length; i++){
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        }

        System.out.println(max);
    }

    static boolean isACGT(char c){
        if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
            return true;
        }
        return false;
    }
} public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String s = stdIn.next();

        char [] cs = s.toCharArray();

        int max = 0;
        int temp = 0;
        for(int i=0; i<cs.length; i++){
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        }

        System.out.println(max);
    }

    static boolean isACGT(char c){
        if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
            return true;
        }
        return false;
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String s = stdIn.next();

        char [] cs = s.toCharArray();

        int max = 0;
        int temp = 0;
        for(int i=0; i<cs.length; i++){
            if(isACGT(cs[i])){
                temp++;
                if(temp > max){
                    max = temp;
                }
            }else{
                temp = 0;
            }
        }

        System.out.println(max);
    }

    static boolean isACGT(char c){
        if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
            return true;
        }
        return false;
    }
}