import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		String s = in.next();
		System.out.println(solve(s));
		in.close();
	}

	private static int solve(String s) {
		int ans = 0;
		int t = 0;
		for (int i = 0; i < s.length(); i++)
			if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0;
		return ans;
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		String s = in.next();
		System.out.println(solve(s));
		in.close();
	}

	private static int solve(String s) {
		int ans = 0;
		int t = 0;
		for (int i = 0; i < s.length(); i++)
			if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0;
		return ans;
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		String s = in.next();
		System.out.println(solve(s));
		in.close();
	} main {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		String s = in.next();
		System.out.println(solve(s));
		in.close();
	} Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) String s = in.next(); s in.next() in.next in System.out.println(solve(s)) System.out.println System.out System System.out solve(s) solve s in.close() in.close in String[] args args private static int solve(String s) {
		int ans = 0;
		int t = 0;
		for (int i = 0; i < s.length(); i++)
			if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0;
		return ans;
	} solve {
		int ans = 0;
		int t = 0;
		for (int i = 0; i < s.length(); i++)
			if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0;
		return ans;
	} int ans = 0; ans 0 int t = 0; t 0 for (int i = 0; i < s.length(); i++)
			if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0; int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0; if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0; s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C' s.charAt(i) == 'G' s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C' s.charAt(i) == 'A' s.charAt(i) s.charAt s i 'A' s.charAt(i) == 'T' s.charAt(i) s.charAt s i 'T' s.charAt(i) == 'G' s.charAt(i) s.charAt s i 'G' s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
				t++;
				if (t > ans)
					ans = t;
			} t++ t if (t > ans)
					ans = t; t > ans t ans ans = t ans t t = 0 t 0 return ans; ans String s s public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		String s = in.next();
		System.out.println(solve(s));
		in.close();
	}

	private static int solve(String s) {
		int ans = 0;
		int t = 0;
		for (int i = 0; i < s.length(); i++)
			if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0;
		return ans;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		String s = in.next();
		System.out.println(solve(s));
		in.close();
	}

	private static int solve(String s) {
		int ans = 0;
		int t = 0;
		for (int i = 0; i < s.length(); i++)
			if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0;
		return ans;
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		String s = in.next();
		System.out.println(solve(s));
		in.close();
	}

	private static int solve(String s) {
		int ans = 0;
		int t = 0;
		for (int i = 0; i < s.length(); i++)
			if (s.charAt(i) == 'A' || s.charAt(i) == 'T' || s.charAt(i) == 'G' || s.charAt(i) == 'C') {
				t++;
				if (t > ans)
					ans = t;
			} else
				t = 0;
		return ans;
	}
}