import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int count = 0;
		int maxCount = 0;
		for(int i=0; i<S.length(); i++) {
			String a = S.substring(i,i+1);
			if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			}
			if(maxCount < count) {
				maxCount=count;
			}
		}
		System.out.println(maxCount);

	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int count = 0;
		int maxCount = 0;
		for(int i=0; i<S.length(); i++) {
			String a = S.substring(i,i+1);
			if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			}
			if(maxCount < count) {
				maxCount=count;
			}
		}
		System.out.println(maxCount);

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int count = 0;
		int maxCount = 0;
		for(int i=0; i<S.length(); i++) {
			String a = S.substring(i,i+1);
			if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			}
			if(maxCount < count) {
				maxCount=count;
			}
		}
		System.out.println(maxCount);

	} main {

		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int count = 0;
		int maxCount = 0;
		for(int i=0; i<S.length(); i++) {
			String a = S.substring(i,i+1);
			if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			}
			if(maxCount < count) {
				maxCount=count;
			}
		}
		System.out.println(maxCount);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int count = 0; count 0 int maxCount = 0; maxCount 0 for(int i=0; i<S.length(); i++) {
			String a = S.substring(i,i+1);
			if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			}
			if(maxCount < count) {
				maxCount=count;
			}
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			String a = S.substring(i,i+1);
			if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			}
			if(maxCount < count) {
				maxCount=count;
			}
		} {
			String a = S.substring(i,i+1);
			if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			}
			if(maxCount < count) {
				maxCount=count;
			}
		} String a = S.substring(i,i+1); a S.substring(i,i+1) S.substring S i i+1 i 1 if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			} a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") a.equals("G") a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") a.equals("A") a.equals a "A" a.equals("C") a.equals a "C" a.equals("G") a.equals a "G" a.equals("T") a.equals a "T" {
				count++;
			} count++ count {
				count = 0;
			} count = 0 count 0 if(maxCount < count) {
				maxCount=count;
			} maxCount < count maxCount count {
				maxCount=count;
			} maxCount=count maxCount count System.out.println(maxCount) System.out.println System.out System System.out maxCount String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int count = 0;
		int maxCount = 0;
		for(int i=0; i<S.length(); i++) {
			String a = S.substring(i,i+1);
			if(a.equals("A") || a.equals("C") ||a.equals("G") ||a.equals("T") ) {
				count++;
			} else {
				count = 0;
			}
			if(maxCount < count) {
				maxCount=count;
			}
		}
		System.out.println(maxCount);

	}
}
