import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String[] array = s.split("");

		int ans = 0;
		for(int i=0;i<array.length;i++) {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		}
		System.out.println(ans);

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String[] array = s.split("");

		int ans = 0;
		for(int i=0;i<array.length;i++) {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		}
		System.out.println(ans);

	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String[] array = s.split("");

		int ans = 0;
		for(int i=0;i<array.length;i++) {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		}
		System.out.println(ans);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String[] array = s.split("");

		int ans = 0;
		for(int i=0;i<array.length;i++) {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		}
		System.out.println(ans);

	} 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 String[] array = s.split(""); array s.split("") s.split s "" int ans = 0; ans 0 for(int i=0;i<array.length;i++) {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		} int i=0; int i=0; i 0 i<array.length i array.length array array.length i++ i++ i {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		} {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		} String tmp1 = array[i]; tmp1 array[i] array i if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			} tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T") tmp1.equals("G") tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T") tmp1.equals("A") tmp1.equals tmp1 "A" tmp1.equals("C") tmp1.equals tmp1 "C" tmp1.equals("G") tmp1.equals tmp1 "G" tmp1.equals("T") tmp1.equals tmp1 "T" {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			} int ans1 = 0; ans1 0 for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				} int j=i; int j=i; j i j<array.length j array.length array array.length j++ j++ j {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				} {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				} tmp1 = array[j] tmp1 array[j] array j if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					} tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T") tmp1.equals("G") tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T") tmp1.equals("A") tmp1.equals tmp1 "A" tmp1.equals("C") tmp1.equals tmp1 "C" tmp1.equals("G") tmp1.equals tmp1 "G" tmp1.equals("T") tmp1.equals tmp1 "T" {
						ans1++;
						ans = Math.max(ans, ans1);
					} ans1++ ans1 ans = Math.max(ans, ans1) ans Math.max(ans, ans1) Math.max Math ans ans1 {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					} ans = Math.max(ans, ans1) ans Math.max(ans, ans1) Math.max Math ans ans1 ans1 = 0 ans1 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String[] array = s.split("");

		int ans = 0;
		for(int i=0;i<array.length;i++) {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		}
		System.out.println(ans);

	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String[] array = s.split("");

		int ans = 0;
		for(int i=0;i<array.length;i++) {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		}
		System.out.println(ans);

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		String[] array = s.split("");

		int ans = 0;
		for(int i=0;i<array.length;i++) {
			String tmp1 = array[i];
			if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
				int ans1 = 0;
				for(int j=i;j<array.length;j++) {
					tmp1 = array[j];
					if(tmp1.equals("A")||tmp1.equals("C")||tmp1.equals("G")||tmp1.equals("T")) {
						ans1++;
						ans = Math.max(ans, ans1);
					}else {
						ans = Math.max(ans, ans1);
						ans1 = 0;
					}
				}
			}
		}
		System.out.println(ans);

	}
}