import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		int cnt=0, ans=0;
		for(char c: s.toCharArray()) {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		}
		System.out.println(ans);
	}
} 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.nextLine();
		int cnt=0, ans=0;
		for(char c: s.toCharArray()) {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		}
		System.out.println(ans);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		int cnt=0, ans=0;
		for(char c: s.toCharArray()) {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		int cnt=0, ans=0;
		for(char c: s.toCharArray()) {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc int cnt=0 cnt 0 ans=0; ans 0 for(char c: s.toCharArray()) {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		} char c s.toCharArray() s.toCharArray s {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		} {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		} if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0; c=='A' || c=='C' || c=='G' || c=='T' c=='G' c=='A' || c=='C' || c=='G' || c=='T' c=='A' c 'A' c=='C' c 'C' c=='G' c 'G' c=='T' c 'T' cnt++ cnt cnt=0 cnt 0 ans=Math.max(cnt, ans) ans Math.max(cnt, ans) Math.max Math cnt ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		int cnt=0, ans=0;
		for(char c: s.toCharArray()) {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		int cnt=0, ans=0;
		for(char c: s.toCharArray()) {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		int cnt=0, ans=0;
		for(char c: s.toCharArray()) {
			if(c=='A' || c=='C' || c=='G' || c=='T')
				cnt++;
			else
				cnt=0;
			ans=Math.max(cnt, ans);
		}
		System.out.println(ans);
	}
}