import java.util.Scanner;
public class Main {
	public static void main(String[] args)throws Exception{
		Scanner stdIn=new Scanner(System.in);
		String S=stdIn.next();
		int N=S.length();
		int max=0;
		for(int i=1;i<=N;i++){
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		}
		System.out.println(max);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args)throws Exception{
		Scanner stdIn=new Scanner(System.in);
		String S=stdIn.next();
		int N=S.length();
		int max=0;
		for(int i=1;i<=N;i++){
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		}
		System.out.println(max);
	}
} Main public static void main(String[] args)throws Exception{
		Scanner stdIn=new Scanner(System.in);
		String S=stdIn.next();
		int N=S.length();
		int max=0;
		for(int i=1;i<=N;i++){
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		}
		System.out.println(max);
	} main {
		Scanner stdIn=new Scanner(System.in);
		String S=stdIn.next();
		int N=S.length();
		int max=0;
		for(int i=1;i<=N;i++){
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		}
		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 int N=S.length(); N S.length() S.length S int max=0; max 0 for(int i=1;i<=N;i++){
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		} {
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		} for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			} int j=0; int j=0; j 0 j+i<=N j+i j i N j++ j++ j {
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			} {
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			} String a=S.substring(j,j+i); a S.substring(j,j+i) S.substring S j j+i j i boolean key=true; key true for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				} int k=0; int k=0; k 0 k<a.length() k a.length() a.length a k++ k++ k {
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				} {
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				} char b=a.charAt(k); b a.charAt(k) a.charAt a k if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false; (b=='A'||b=='C'||b=='G'||b=='T')==false (b=='A'||b=='C'||b=='G'||b=='T') b=='G' b=='A'||b=='C'||b=='G'||b=='T' b=='A' b 'A' b=='C' b 'C' b=='G' b 'G' b=='T' b 'T' false key=false key false if(key&&i>max)
					max=i; key&&i>max key i>max i max max=i max i 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)throws Exception{
		Scanner stdIn=new Scanner(System.in);
		String S=stdIn.next();
		int N=S.length();
		int max=0;
		for(int i=1;i<=N;i++){
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		}
		System.out.println(max);
	}
} public class Main {
	public static void main(String[] args)throws Exception{
		Scanner stdIn=new Scanner(System.in);
		String S=stdIn.next();
		int N=S.length();
		int max=0;
		for(int i=1;i<=N;i++){
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		}
		System.out.println(max);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args)throws Exception{
		Scanner stdIn=new Scanner(System.in);
		String S=stdIn.next();
		int N=S.length();
		int max=0;
		for(int i=1;i<=N;i++){
			for(int j=0;j+i<=N;j++){
				String a=S.substring(j,j+i);
				boolean key=true;
				for(int k=0;k<a.length();k++){
					char b=a.charAt(k);
					if((b=='A'||b=='C'||b=='G'||b=='T')==false)
						key=false;
				}
				if(key&&i>max)
					max=i;
			}
		}
		System.out.println(max);
	}
}
