import java.util.*;
public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        String S = sc.next();
        
        String[] ar = S.split("");

        int maxLength = 0;
        int tmp = 0;

        for (int i = 0; i < ar.length; i++){
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        }

        System.out.println(maxLength);
     }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        String S = sc.next();
        
        String[] ar = S.split("");

        int maxLength = 0;
        int tmp = 0;

        for (int i = 0; i < ar.length; i++){
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        }

        System.out.println(maxLength);
     }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        String S = sc.next();
        
        String[] ar = S.split("");

        int maxLength = 0;
        int tmp = 0;

        for (int i = 0; i < ar.length; i++){
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        }

        System.out.println(maxLength);
     } main {
        Scanner sc = new Scanner(System.in);
        
        String S = sc.next();
        
        String[] ar = S.split("");

        int maxLength = 0;
        int tmp = 0;

        for (int i = 0; i < ar.length; i++){
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        }

        System.out.println(maxLength);
     } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String[] ar = S.split(""); ar S.split("") S.split S "" int maxLength = 0; maxLength 0 int tmp = 0; tmp 0 for (int i = 0; i < ar.length; i++){
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        } int i = 0; int i = 0; i 0 i < ar.length i ar.length ar ar.length i++ i++ i {
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        } {
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        } if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            } ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C") ar[i].equals("G") ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C") ar[i].equals("A") ar[i].equals ar[i] ar i "A" ar[i].equals("T") ar[i].equals ar[i] ar i "T" ar[i].equals("G") ar[i].equals ar[i] ar i "G" ar[i].equals("C") ar[i].equals ar[i] ar i "C" {
                tmp++;
            } tmp++ tmp {
                tmp = 0;
            } tmp = 0 tmp 0 if (tmp > maxLength) {
                maxLength = tmp;
            } tmp > maxLength tmp maxLength {
                maxLength = tmp;
            } maxLength = tmp maxLength tmp System.out.println(maxLength) System.out.println System.out System System.out maxLength String[] args args public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        String S = sc.next();
        
        String[] ar = S.split("");

        int maxLength = 0;
        int tmp = 0;

        for (int i = 0; i < ar.length; i++){
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        }

        System.out.println(maxLength);
     }
} public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        String S = sc.next();
        
        String[] ar = S.split("");

        int maxLength = 0;
        int tmp = 0;

        for (int i = 0; i < ar.length; i++){
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        }

        System.out.println(maxLength);
     }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        String S = sc.next();
        
        String[] ar = S.split("");

        int maxLength = 0;
        int tmp = 0;

        for (int i = 0; i < ar.length; i++){
            
            if (ar[i].equals("A") || ar[i].equals("T") || ar[i].equals("G") || ar[i].equals("C")) {
                tmp++;
            } else {
                tmp = 0;
            }

            if (tmp > maxLength) {
                maxLength = tmp;
            }

        }

        System.out.println(maxLength);
     }
}
