import java.util.*;
import java.math.*;
import java.util.Scanner;
import java.math.BigInteger;
   
public class Main {
	static final long mod = (int)(1e9+7);
	static final int inf=(int)(1e9);
	static final int maxn=(int)(1e5+10);
	static long ksm(long a,long b) {
		long ret=1;
		while(b!=0) {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		}
		return ret;
	}
	public static void main(String[] args) {
    	Scanner cin=new Scanner(System.in);
    	String s=cin.next();
    	int len=s.length();
    	int cnt=0,ans=0;
    	for(int i=0;i<len;i++) {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	}
    	System.out.println(ans);
    }
} import java.util.*; util.* java import java.math.*; math.* java import java.util.Scanner; Scanner java.util import java.math.BigInteger; BigInteger java.math public class Main {
	static final long mod = (int)(1e9+7);
	static final int inf=(int)(1e9);
	static final int maxn=(int)(1e5+10);
	static long ksm(long a,long b) {
		long ret=1;
		while(b!=0) {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		}
		return ret;
	}
	public static void main(String[] args) {
    	Scanner cin=new Scanner(System.in);
    	String s=cin.next();
    	int len=s.length();
    	int cnt=0,ans=0;
    	for(int i=0;i<len;i++) {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	}
    	System.out.println(ans);
    }
} Main static final long mod = (int)(1e9+7); mod (int)(1e9+7) 1e9 7 static final int inf=(int)(1e9); inf (int)(1e9) static final int maxn=(int)(1e5+10); maxn (int)(1e5+10) 1e5 10 static long ksm(long a,long b) {
		long ret=1;
		while(b!=0) {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		}
		return ret;
	} ksm {
		long ret=1;
		while(b!=0) {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		}
		return ret;
	} long ret=1; ret 1 while(b!=0) {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		} b!=0 b 0 {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		} if(b%2==1) {
				ret=ret*a%mod;
			} b%2==1 b%2 b 2 1 {
				ret=ret*a%mod;
			} ret=ret*a%mod ret ret*a%mod ret*a ret a mod b>>=1 b 1 a=a*a%mod a a*a%mod a*a a a mod return ret; ret long a a long b b public static void main(String[] args) {
    	Scanner cin=new Scanner(System.in);
    	String s=cin.next();
    	int len=s.length();
    	int cnt=0,ans=0;
    	for(int i=0;i<len;i++) {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	}
    	System.out.println(ans);
    } main {
    	Scanner cin=new Scanner(System.in);
    	String s=cin.next();
    	int len=s.length();
    	int cnt=0,ans=0;
    	for(int i=0;i<len;i++) {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	}
    	System.out.println(ans);
    } Scanner cin=new Scanner(System.in); cin new Scanner(System.in) String s=cin.next(); s cin.next() cin.next cin int len=s.length(); len s.length() s.length s int cnt=0 cnt 0 ans=0; ans 0 for(int i=0;i<len;i++) {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	} int i=0; int i=0; i 0 i<len i len i++ i++ i {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	} {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	} if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=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' {
    			cnt++;
    		} cnt++ cnt {
    			cnt=0;
    		} cnt=0 cnt 0 ans=Math.max(ans, cnt) ans Math.max(ans, cnt) Math.max Math ans cnt System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	static final long mod = (int)(1e9+7);
	static final int inf=(int)(1e9);
	static final int maxn=(int)(1e5+10);
	static long ksm(long a,long b) {
		long ret=1;
		while(b!=0) {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		}
		return ret;
	}
	public static void main(String[] args) {
    	Scanner cin=new Scanner(System.in);
    	String s=cin.next();
    	int len=s.length();
    	int cnt=0,ans=0;
    	for(int i=0;i<len;i++) {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	}
    	System.out.println(ans);
    }
} public class Main {
	static final long mod = (int)(1e9+7);
	static final int inf=(int)(1e9);
	static final int maxn=(int)(1e5+10);
	static long ksm(long a,long b) {
		long ret=1;
		while(b!=0) {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		}
		return ret;
	}
	public static void main(String[] args) {
    	Scanner cin=new Scanner(System.in);
    	String s=cin.next();
    	int len=s.length();
    	int cnt=0,ans=0;
    	for(int i=0;i<len;i++) {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	}
    	System.out.println(ans);
    }
} Main
import java.util.*;
import java.math.*;
import java.util.Scanner;
import java.math.BigInteger;
   
public class Main {
	static final long mod = (int)(1e9+7);
	static final int inf=(int)(1e9);
	static final int maxn=(int)(1e5+10);
	static long ksm(long a,long b) {
		long ret=1;
		while(b!=0) {
			if(b%2==1) {
				ret=ret*a%mod;
			}
			b>>=1;
			a=a*a%mod;
		}
		return ret;
	}
	public static void main(String[] args) {
    	Scanner cin=new Scanner(System.in);
    	String s=cin.next();
    	int len=s.length();
    	int cnt=0,ans=0;
    	for(int i=0;i<len;i++) {
    		if(s.charAt(i)=='A'||s.charAt(i)=='C'||s.charAt(i)=='G'||s.charAt(i)=='T') {
    			cnt++;
    		}else {
    			cnt=0;
    		}
    		ans=Math.max(ans, cnt);
    	}
    	System.out.println(ans);
    }
}