import java.util.Scanner;

public class Main {

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

		char s[] = scan.next().toCharArray();
		int count = 0;
		int ans = 0;

		for (int i = 0; i < s.length; i++) {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		}


		if (ans < count) {
			ans = count;

		}
		System.out.println(ans);
	}

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

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

		char s[] = scan.next().toCharArray();
		int count = 0;
		int ans = 0;

		for (int i = 0; i < s.length; i++) {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		}


		if (ans < count) {
			ans = count;

		}
		System.out.println(ans);
	}

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

		char s[] = scan.next().toCharArray();
		int count = 0;
		int ans = 0;

		for (int i = 0; i < s.length; i++) {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		}


		if (ans < count) {
			ans = count;

		}
		System.out.println(ans);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		char s[] = scan.next().toCharArray();
		int count = 0;
		int ans = 0;

		for (int i = 0; i < s.length; i++) {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		}


		if (ans < count) {
			ans = count;

		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) char s[] = scan.next().toCharArray(); s scan.next().toCharArray() scan.next().toCharArray scan.next() scan.next scan int count = 0; count 0 int ans = 0; ans 0 for (int i = 0; i < s.length; i++) {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		} {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		} if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			} s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T' s[i] == 'G' s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T' s[i] == 'A' s[i] s i 'A' s[i] == 'C' s[i] s i 'C' s[i] == 'G' s[i] s i 'G' s[i] == 'T' s[i] s i 'T' {
				count++;
			} count++ count {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			} if (ans < count) {
					ans = count;
					count = 0;
				} ans < count ans count {
					ans = count;
					count = 0;
				} ans = count ans count count = 0 count 0 if (ans < count) {
			ans = count;

		} ans < count ans count {
			ans = count;

		} ans = count ans count 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 scan = new Scanner(System.in);

		char s[] = scan.next().toCharArray();
		int count = 0;
		int ans = 0;

		for (int i = 0; i < s.length; i++) {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		}


		if (ans < count) {
			ans = count;

		}
		System.out.println(ans);
	}

} public class Main {

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

		char s[] = scan.next().toCharArray();
		int count = 0;
		int ans = 0;

		for (int i = 0; i < s.length; i++) {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		}


		if (ans < count) {
			ans = count;

		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

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

		char s[] = scan.next().toCharArray();
		int count = 0;
		int ans = 0;

		for (int i = 0; i < s.length; i++) {
			if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') {
				count++;
			} else {
				if (ans < count) {
					ans = count;
					count = 0;
				}
			}
		}


		if (ans < count) {
			ans = count;

		}
		System.out.println(ans);
	}

}