import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<Integer> list_count=new ArrayList<Integer>();
		//Integer[] Republican = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int answer=0;
		for(int i=0;list.size()>i;i++) {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		}
		System.out.println(Collections.max(list_count));
	}
}
 import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<Integer> list_count=new ArrayList<Integer>();
		//Integer[] Republican = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int answer=0;
		for(int i=0;list.size()>i;i++) {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		}
		System.out.println(Collections.max(list_count));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<Integer> list_count=new ArrayList<Integer>();
		//Integer[] Republican = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int answer=0;
		for(int i=0;list.size()>i;i++) {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		}
		System.out.println(Collections.max(list_count));
	} main {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<Integer> list_count=new ArrayList<Integer>();
		//Integer[] Republican = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int answer=0;
		for(int i=0;list.size()>i;i++) {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		}
		System.out.println(Collections.max(list_count));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<Integer> list_count=new ArrayList<Integer>(); list_count new ArrayList<Integer>() String s = sc.next(); s sc.next() sc.next sc List<String> list= new ArrayList<String>(Arrays.asList(s.split(""))); list new ArrayList<String>(Arrays.asList(s.split(""))) int answer=0; answer 0 for(int i=0;list.size()>i;i++) {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		} int i=0; int i=0; i 0 list.size()>i list.size() list.size list i i++ i++ i {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		} {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		} int count=0; count 0 while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			} true {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			} if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				} list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T") list.get(i).equals("G") list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T") list.get(i).equals("A") list.get(i).equals list.get(i) list.get list i "A" list.get(i).equals("C") list.get(i).equals list.get(i) list.get list i "C" list.get(i).equals("G") list.get(i).equals list.get(i) list.get list i "G" list.get(i).equals("T") list.get(i).equals list.get(i) list.get list i "T" {
					count++;
				} count++ count {
					break;
				} break; i++ i if(i==list.size())
					break; i==list.size() i list.size() list.size list break; list_count.add(count) list_count.add list_count count System.out.println(Collections.max(list_count)) System.out.println System.out System System.out Collections.max(list_count) Collections.max Collections list_count String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<Integer> list_count=new ArrayList<Integer>();
		//Integer[] Republican = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int answer=0;
		for(int i=0;list.size()>i;i++) {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		}
		System.out.println(Collections.max(list_count));
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<Integer> list_count=new ArrayList<Integer>();
		//Integer[] Republican = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int answer=0;
		for(int i=0;list.size()>i;i++) {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		}
		System.out.println(Collections.max(list_count));
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		List<Integer> list_count=new ArrayList<Integer>();
		//Integer[] Republican = new Integer[m];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int answer=0;
		for(int i=0;list.size()>i;i++) {
			int count=0;
			while(true) {
				if(list.get(i).equals("A")||list.get(i).equals("C")||list.get(i).equals("G")
						||list.get(i).equals("T")){
					count++;
				}
				else {
					break;
				}
				i++;
				if(i==list.size())
					break;
			}
			list_count.add(count);
		}
		System.out.println(Collections.max(list_count));
	}
}

