import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s =scanner.next();
        int answer = 0;
        int instance = 0;
        for (int i=0;i<s.length();i++){
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        }
        System.out.println(answer);
    }

} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s =scanner.next();
        int answer = 0;
        int instance = 0;
        for (int i=0;i<s.length();i++){
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        }
        System.out.println(answer);
    }

} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s =scanner.next();
        int answer = 0;
        int instance = 0;
        for (int i=0;i<s.length();i++){
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        }
        System.out.println(answer);
    } main {
        Scanner scanner = new Scanner(System.in);
        String s =scanner.next();
        int answer = 0;
        int instance = 0;
        for (int i=0;i<s.length();i++){
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        }
        System.out.println(answer);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s =scanner.next(); s scanner.next() scanner.next scanner int answer = 0; answer 0 int instance = 0; instance 0 for (int i=0;i<s.length();i++){
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        } {
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        } if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            } s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T' s.charAt(i)=='G' s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T' s.charAt(i)=='A' s.charAt(i) s.charAt s i 'A' s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' s.charAt(i)=='G' s.charAt(i) s.charAt s i 'G' s.charAt(i)=='T' s.charAt(i) s.charAt s i 'T' {
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            } instance++ instance if (instance>answer){
                    answer = instance;
                } instance>answer instance answer {
                    answer = instance;
                } answer = instance answer instance {
                instance = 0;
            } instance = 0 instance 0 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s =scanner.next();
        int answer = 0;
        int instance = 0;
        for (int i=0;i<s.length();i++){
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        }
        System.out.println(answer);
    }

} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s =scanner.next();
        int answer = 0;
        int instance = 0;
        for (int i=0;i<s.length();i++){
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        }
        System.out.println(answer);
    }

} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s =scanner.next();
        int answer = 0;
        int instance = 0;
        for (int i=0;i<s.length();i++){
            if (s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T'){
                instance++;
                if (instance>answer){
                    answer = instance;
                }
            }else{
                instance = 0;
            }
        }
        System.out.println(answer);
    }

}