import java.util.*;

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

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

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

		int max = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				ans++;
				max = Math.max(max, ans);
			} else {
				ans = 0;
			}
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		sc.close();

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

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

		int max = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				ans++;
				max = Math.max(max, ans);
			} else {
				ans = 0;
			}
		}
		System.out.println(max);
	}
} Main
import java.util.*;

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

		int max = 0;
		int ans = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				ans++;
				max = Math.max(max, ans);
			} else {
				ans = 0;
			}
		}
		System.out.println(max);
	}
}
