
import java.util.Scanner;

public class Main {

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

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

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

import java.util.Scanner;

public class Main {

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