import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);

		String st = s.next();

		char[] cs = st.toCharArray();

		int max = 0;
		int tmp = 0;

		for (char c : cs) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		}

		System.out.println(max < tmp ? tmp : max);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);

		String st = s.next();

		char[] cs = st.toCharArray();

		int max = 0;
		int tmp = 0;

		for (char c : cs) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		}

		System.out.println(max < tmp ? tmp : max);
	}
} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);

		String st = s.next();

		char[] cs = st.toCharArray();

		int max = 0;
		int tmp = 0;

		for (char c : cs) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		}

		System.out.println(max < tmp ? tmp : max);
	} main {
		Scanner s = new Scanner(System.in);

		String st = s.next();

		char[] cs = st.toCharArray();

		int max = 0;
		int tmp = 0;

		for (char c : cs) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		}

		System.out.println(max < tmp ? tmp : max);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) String st = s.next(); st s.next() s.next s char[] cs = st.toCharArray(); cs st.toCharArray() st.toCharArray st int max = 0; max 0 int tmp = 0; tmp 0 for (char c : cs) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		} char c cs {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		} {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		} if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			} c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'G' c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'A' c 'A' c == 'C' c 'C' c == 'G' c 'G' c == 'T' c 'T' {
				tmp++;
			} tmp++ tmp {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			} if (tmp > max) {
					max = tmp;
				} tmp > max tmp max {
					max = tmp;
				} max = tmp max tmp tmp = 0 tmp 0 System.out.println(max < tmp ? tmp : max) System.out.println System.out System System.out max < tmp ? tmp : max max < tmp max tmp tmp max String[] args args public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);

		String st = s.next();

		char[] cs = st.toCharArray();

		int max = 0;
		int tmp = 0;

		for (char c : cs) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		}

		System.out.println(max < tmp ? tmp : max);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);

		String st = s.next();

		char[] cs = st.toCharArray();

		int max = 0;
		int tmp = 0;

		for (char c : cs) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		}

		System.out.println(max < tmp ? tmp : max);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);

		String st = s.next();

		char[] cs = st.toCharArray();

		int max = 0;
		int tmp = 0;

		for (char c : cs) {
			if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
				tmp++;
			} else {
				if (tmp > max) {
					max = tmp;
				}
				tmp = 0;
			}
		}

		System.out.println(max < tmp ? tmp : max);
	}
}