import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String [] sArray = s.split("");
		int count = 0;
		int maxlen = 0;
		for(int i = 0; i < sArray.length; i++) {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		}
		System.out.println(maxlen);
		sc.close();
	}

} 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.next();
		String [] sArray = s.split("");
		int count = 0;
		int maxlen = 0;
		for(int i = 0; i < sArray.length; i++) {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		}
		System.out.println(maxlen);
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String [] sArray = s.split("");
		int count = 0;
		int maxlen = 0;
		for(int i = 0; i < sArray.length; i++) {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		}
		System.out.println(maxlen);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String [] sArray = s.split("");
		int count = 0;
		int maxlen = 0;
		for(int i = 0; i < sArray.length; i++) {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		}
		System.out.println(maxlen);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String [] sArray = s.split(""); sArray s.split("") s.split s "" int count = 0; count 0 int maxlen = 0; maxlen 0 for(int i = 0; i < sArray.length; i++) {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		} int i = 0; int i = 0; i 0 i < sArray.length i sArray.length sArray sArray.length i++ i++ i {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		} {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		} if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0; sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T") sArray[i].equals("G") sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T") sArray[i].equals("A") sArray[i].equals sArray[i] sArray i "A" sArray[i].equals("C") sArray[i].equals sArray[i] sArray i "C" sArray[i].equals("G") sArray[i].equals sArray[i] sArray i "G" sArray[i].equals("T") sArray[i].equals sArray[i] sArray i "T" {
				count++;
				if(count >= maxlen) maxlen = count;
			} count++ count if(count >= maxlen) maxlen = count; count >= maxlen count maxlen maxlen = count maxlen count count = 0 count 0 System.out.println(maxlen) System.out.println System.out System System.out maxlen sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String [] sArray = s.split("");
		int count = 0;
		int maxlen = 0;
		for(int i = 0; i < sArray.length; i++) {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		}
		System.out.println(maxlen);
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String [] sArray = s.split("");
		int count = 0;
		int maxlen = 0;
		for(int i = 0; i < sArray.length; i++) {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		}
		System.out.println(maxlen);
		sc.close();
	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String [] sArray = s.split("");
		int count = 0;
		int maxlen = 0;
		for(int i = 0; i < sArray.length; i++) {
			if(sArray[i].equals("A")||sArray[i].equals("C")||sArray[i].equals("G")||sArray[i].equals("T")) {
				count++;
				if(count >= maxlen) maxlen = count;
			}else count = 0;
		}
		System.out.println(maxlen);
		sc.close();
	}

}
