import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		char []t = s.toCharArray();
		int max = 0;
		int count = 0;
		for(int i = 0; i <s.length(); i++) {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =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();
		char []t = s.toCharArray();
		int max = 0;
		int count = 0;
		for(int i = 0; i <s.length(); i++) {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =0;
				}
			}
		System.out.println(max);
	}

} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		char []t = s.toCharArray();
		int max = 0;
		int count = 0;
		for(int i = 0; i <s.length(); i++) {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =0;
				}
			}
		System.out.println(max);
	} main {
		
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		char []t = s.toCharArray();
		int max = 0;
		int count = 0;
		for(int i = 0; i <s.length(); i++) {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =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 char []t = s.toCharArray(); t s.toCharArray() s.toCharArray s int max = 0; max 0 int count = 0; count 0 for(int i = 0; i <s.length(); i++) {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =0;
				}
			} int i = 0; int i = 0; i 0 i <s.length() i s.length() s.length s i++ i++ i {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =0;
				}
			} {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =0;
				}
			} boolean p = true; p true p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G') p (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G') t[i]=='C' t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G' t[i] == 'A' t[i] t i 'A' t[i] =='T' t[i] t i 'T' t[i]=='C' t[i] t i 'C' t[i]=='G' t[i] t i 'G' if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =0;
				} p {
					count++;
					max = Math.max(max, count);
				} count++ count max = Math.max(max, count) max Math.max(max, count) Math.max Math max count {
					count =0;
				} count =0 count 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();
		char []t = s.toCharArray();
		int max = 0;
		int count = 0;
		for(int i = 0; i <s.length(); i++) {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =0;
				}
			}
		System.out.println(max);
	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		char []t = s.toCharArray();
		int max = 0;
		int count = 0;
		for(int i = 0; i <s.length(); i++) {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =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();
		char []t = s.toCharArray();
		int max = 0;
		int count = 0;
		for(int i = 0; i <s.length(); i++) {
			boolean p = true;
			p = (t[i] == 'A'||t[i] =='T'||t[i]=='C'||t[i]=='G');
				if(p) {
					count++;
					max = Math.max(max, count);
				}
				else{
					count =0;
				}
			}
		System.out.println(max);
	}

}
