import java.util.*;
 
public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int count = 0;
		int max = 0;
		String[] word = new String[str.length()];
		for (int i = 0; i < str.length(); i++) {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		}

		for(int i=0; i<str.length(); i++){
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		}
		System.out.println(max);
	}
}


		 import java.util.*; util.* java public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int count = 0;
		int max = 0;
		String[] word = new String[str.length()];
		for (int i = 0; i < str.length(); i++) {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		}

		for(int i=0; i<str.length(); i++){
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		}
		System.out.println(max);
	}
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int count = 0;
		int max = 0;
		String[] word = new String[str.length()];
		for (int i = 0; i < str.length(); i++) {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		}

		for(int i=0; i<str.length(); i++){
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		}
		System.out.println(max);
	} main {
    	Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int count = 0;
		int max = 0;
		String[] word = new String[str.length()];
		for (int i = 0; i < str.length(); i++) {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		}

		for(int i=0; i<str.length(); i++){
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		}
		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc int count = 0; count 0 int max = 0; max 0 String[] word = new String[str.length()]; word new String[str.length()] str.length() str.length str for (int i = 0; i < str.length(); i++) {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		} {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		} String str2 = String.valueOf(str.charAt(i)); str2 String.valueOf(str.charAt(i)) String.valueOf String str.charAt(i) str.charAt str i word[i] = str2 word[i] word i str2 for(int i=0; i<str.length(); i++){
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		} {
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		} for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			} int j=i; int j=i; j i j<str.length() j str.length() str.length str j++ j++ j {
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			} {
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			} if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				} count==0 count 0 {
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				} if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					} (word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T")) (word[j].equals("G")) (word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T")) (word[j].equals("A")) word[j].equals word[j] word j "A" (word[j].equals("C")) word[j].equals word[j] word j "C" (word[j].equals("G")) word[j].equals word[j] word j "G" (word[j].equals("T")) word[j].equals word[j] word j "T" {
						count++;
					} count++ count {
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				} if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					} (word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T")) (word[j].equals("G")) (word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T")) (word[j].equals("A")) word[j].equals word[j] word j "A" (word[j].equals("C")) word[j].equals word[j] word j "C" (word[j].equals("G")) word[j].equals word[j] word j "G" (word[j].equals("T")) word[j].equals word[j] word j "T" {
						count++;
					} count++ count {
						if(max<count){
							max=count;
						}
						count=0;
					} if(max<count){
							max=count;
						} max<count max count {
							max=count;
						} max=count max count count=0 count 0 if(max<count){
				max=count;
			} max<count max count {
				max=count;
			} max=count max count count=0 count 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int count = 0;
		int max = 0;
		String[] word = new String[str.length()];
		for (int i = 0; i < str.length(); i++) {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		}

		for(int i=0; i<str.length(); i++){
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		}
		System.out.println(max);
	}
} public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int count = 0;
		int max = 0;
		String[] word = new String[str.length()];
		for (int i = 0; i < str.length(); i++) {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		}

		for(int i=0; i<str.length(); i++){
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		}
		System.out.println(max);
	}
} Main
import java.util.*;
 
public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		int count = 0;
		int max = 0;
		String[] word = new String[str.length()];
		for (int i = 0; i < str.length(); i++) {
		    String str2 = String.valueOf(str.charAt(i));
		    // 配列に順番に格納する
		    word[i] = str2;
		}

		for(int i=0; i<str.length(); i++){
			for(int j=i; j<str.length();j++){
				if(count==0){
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}
				}else{
					if((word[j].equals("A"))||(word[j].equals("C"))||(word[j].equals("G"))||(word[j].equals("T"))){
						count++;
					}else{
						if(max<count){
							max=count;
						}
						count=0;
					}
				}
			}
			if(max<count){
				max=count;
			}
			count=0;
		}
		System.out.println(max);
	}
}


		
