import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		for(int i=0; i<S.length(); i++) {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		}
		System.out.println(max);
	}

} 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();
		sc.close();
		int a = 0;
		int max = 0;
		for(int i=0; i<S.length(); i++) {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		}
		System.out.println(max);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		for(int i=0; i<S.length(); i++) {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		for(int i=0; i<S.length(); i++) {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		}
		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc int a = 0; a 0 int max = 0; max 0 for(int i=0; i<S.length(); i++) {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		} {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		} if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			} S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T' S.charAt(i) == 'G' S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T' S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' S.charAt(i) == 'G' S.charAt(i) S.charAt S i 'G' S.charAt(i) == 'T' S.charAt(i) S.charAt S i 'T' {
				a++;
				max = Math.max(max, a);
			} a++ a max = Math.max(max, a) max Math.max(max, a) Math.max Math max a {
				a = 0;
			} a = 0 a 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		for(int i=0; i<S.length(); i++) {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		}
		System.out.println(max);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		for(int i=0; i<S.length(); i++) {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		}
		System.out.println(max);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		for(int i=0; i<S.length(); i++) {
			if(S.charAt(i) == 'A' || S.charAt(i) == 'C'
				|| S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				a++;
				max = Math.max(max, a);
			}else {
				a = 0;
			}
		}
		System.out.println(max);
	}

}