
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		int cnt = 0;
		int ans = 0;

		sc.close();

		for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		int cnt = 0;
		int ans = 0;

		sc.close();

		for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		int cnt = 0;
		int ans = 0;

		sc.close();

		for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		int cnt = 0;
		int ans = 0;

		sc.close();

		for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] c = sc.next().toCharArray(); c sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int cnt = 0; cnt 0 int ans = 0; ans 0 sc.close() sc.close sc for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		} char d c {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		} {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		} if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			} d != 'A' && d != 'C' && d != 'G' && d != 'T' d != 'G' d != 'A' && d != 'C' && d != 'G' && d != 'T' d != 'A' d 'A' d != 'C' d 'C' d != 'G' d 'G' d != 'T' d 'T' {
				cnt = 0;
				continue;
			} cnt = 0 cnt 0 continue; cnt++ cnt ans = Math.max(ans, cnt) ans Math.max(ans, cnt) Math.max Math ans cnt 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) {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		int cnt = 0;
		int ans = 0;

		sc.close();

		for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		int cnt = 0;
		int ans = 0;

		sc.close();

		for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		}
		System.out.println(ans);
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		int cnt = 0;
		int ans = 0;

		sc.close();

		for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		}
		System.out.println(ans);
	}
}