import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		int count = 0; boolean flag = false; int max = 0;
		for (int i = 0; i < s.length; i++) {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		}
		max = Math.max(max,count);
		System.out.println(max);
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		int count = 0; boolean flag = false; int max = 0;
		for (int i = 0; i < s.length; i++) {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		}
		max = Math.max(max,count);
		System.out.println(max);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		int count = 0; boolean flag = false; int max = 0;
		for (int i = 0; i < s.length; i++) {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		}
		max = Math.max(max,count);
		System.out.println(max);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		int count = 0; boolean flag = false; int max = 0;
		for (int i = 0; i < s.length; i++) {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		}
		max = Math.max(max,count);
		System.out.println(max);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int count = 0; count 0 boolean flag = false; flag false int max = 0; max 0 for (int i = 0; i < s.length; i++) {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		} {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		} if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			} flag {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			} if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				} s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C' s[i]=='G' s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C' s[i]=='A' s[i] s i 'A' s[i]=='T' s[i] s i 'T' s[i]=='G' s[i] s i 'G' s[i]=='C' s[i] s i 'C' count++ count {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				} flag = false flag false max = Math.max(max,count) max Math.max(max,count) Math.max Math max count count = 0 count 0 {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			} if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				} s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C' s[i]=='G' s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C' s[i]=='A' s[i] s i 'A' s[i]=='T' s[i] s i 'T' s[i]=='G' s[i] s i 'G' s[i]=='C' s[i] s i 'C' {
					flag = true;
					count = 1;
				} flag = true flag true count = 1 count 1 max = Math.max(max,count) max Math.max(max,count) Math.max Math max count System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		int count = 0; boolean flag = false; int max = 0;
		for (int i = 0; i < s.length; i++) {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		}
		max = Math.max(max,count);
		System.out.println(max);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		int count = 0; boolean flag = false; int max = 0;
		for (int i = 0; i < s.length; i++) {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		}
		max = Math.max(max,count);
		System.out.println(max);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		int count = 0; boolean flag = false; int max = 0;
		for (int i = 0; i < s.length; i++) {
			if(flag) {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
				else {
					flag = false;
					max = Math.max(max,count);
					count = 0;
				}
			}else {
				if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') {
					flag = true;
					count = 1;
				}
			}
		}
		max = Math.max(max,count);
		System.out.println(max);
		sc.close();
	}
}