import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] arr = s.split("[^ACGT]");
		
		int maxLen = 0;
		for (String str : arr)
			maxLen = Math.max(maxLen, str.length());
		
		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[] arr = s.split("[^ACGT]");
		
		int maxLen = 0;
		for (String str : arr)
			maxLen = Math.max(maxLen, str.length());
		
		System.out.println(maxLen);
		
		sc.close();
	}
	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] arr = s.split("[^ACGT]");
		
		int maxLen = 0;
		for (String str : arr)
			maxLen = Math.max(maxLen, str.length());
		
		System.out.println(maxLen);
		
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] arr = s.split("[^ACGT]");
		
		int maxLen = 0;
		for (String str : arr)
			maxLen = Math.max(maxLen, str.length());
		
		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[] arr = s.split("[^ACGT]"); arr s.split("[^ACGT]") s.split s "[^ACGT]" int maxLen = 0; maxLen 0 for (String str : arr)
			maxLen = Math.max(maxLen, str.length()); String str arr maxLen = Math.max(maxLen, str.length()); maxLen = Math.max(maxLen, str.length()) maxLen Math.max(maxLen, str.length()) Math.max Math maxLen str.length() str.length str 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[] arr = s.split("[^ACGT]");
		
		int maxLen = 0;
		for (String str : arr)
			maxLen = Math.max(maxLen, str.length());
		
		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[] arr = s.split("[^ACGT]");
		
		int maxLen = 0;
		for (String str : arr)
			maxLen = Math.max(maxLen, str.length());
		
		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[] arr = s.split("[^ACGT]");
		
		int maxLen = 0;
		for (String str : arr)
			maxLen = Math.max(maxLen, str.length());
		
		System.out.println(maxLen);
		
		sc.close();
	}
	
}


