import java.util.Scanner;

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

		String S = sc.next();

		String SList[] = new String[S.length()];
		for(int i=0; i<S.length(); i++){
			SList[i] = S.substring(i,i+1);
		}

		int maxlength = 0;
		int length = 0;

		for(int s=0; s<SList.length; s++){
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		}
		System.out.println(maxlength);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

		String S = sc.next();

		String SList[] = new String[S.length()];
		for(int i=0; i<S.length(); i++){
			SList[i] = S.substring(i,i+1);
		}

		int maxlength = 0;
		int length = 0;

		for(int s=0; s<SList.length; s++){
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		}
		System.out.println(maxlength);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

		String S = sc.next();

		String SList[] = new String[S.length()];
		for(int i=0; i<S.length(); i++){
			SList[i] = S.substring(i,i+1);
		}

		int maxlength = 0;
		int length = 0;

		for(int s=0; s<SList.length; s++){
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		}
		System.out.println(maxlength);
    } main {
        Scanner sc = new Scanner(System.in);

		String S = sc.next();

		String SList[] = new String[S.length()];
		for(int i=0; i<S.length(); i++){
			SList[i] = S.substring(i,i+1);
		}

		int maxlength = 0;
		int length = 0;

		for(int s=0; s<SList.length; s++){
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		}
		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 SList[] = new String[S.length()]; SList new String[S.length()] S.length() S.length S for(int i=0; i<S.length(); i++){
			SList[i] = S.substring(i,i+1);
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			SList[i] = S.substring(i,i+1);
		} {
			SList[i] = S.substring(i,i+1);
		} SList[i] = S.substring(i,i+1) SList[i] SList i S.substring(i,i+1) S.substring S i i+1 i 1 int maxlength = 0; maxlength 0 int length = 0; length 0 for(int s=0; s<SList.length; s++){
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		} int s=0; int s=0; s 0 s<SList.length s SList.length SList SList.length s++ s++ s {
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		} {
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		} if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			} SList[s].matches("(A|C|G|T)*") SList[s].matches SList[s] SList s "(A|C|G|T)*" {
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			} length++ length if(maxlength < length){
					maxlength = length;
				} maxlength < length maxlength length {
					maxlength = length;
				} maxlength = length maxlength length {
				length = 0;
				continue;
			} length = 0 length 0 continue; 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 SList[] = new String[S.length()];
		for(int i=0; i<S.length(); i++){
			SList[i] = S.substring(i,i+1);
		}

		int maxlength = 0;
		int length = 0;

		for(int s=0; s<SList.length; s++){
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		}
		System.out.println(maxlength);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

		String S = sc.next();

		String SList[] = new String[S.length()];
		for(int i=0; i<S.length(); i++){
			SList[i] = S.substring(i,i+1);
		}

		int maxlength = 0;
		int length = 0;

		for(int s=0; s<SList.length; s++){
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		}
		System.out.println(maxlength);
    }
} Main
import java.util.Scanner;

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

		String S = sc.next();

		String SList[] = new String[S.length()];
		for(int i=0; i<S.length(); i++){
			SList[i] = S.substring(i,i+1);
		}

		int maxlength = 0;
		int length = 0;

		for(int s=0; s<SList.length; s++){
			if(SList[s].matches("(A|C|G|T)*")){
				length++;
				if(maxlength < length){
					maxlength = length;
				}
			}else{
				length = 0;
				continue;
			}
		}
		System.out.println(maxlength);
    }
}