import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		String txt = scn.next() + " ";
		int x = 0;
		for (int i = 0; i < txt.length(); i++) {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		}
		System.out.println(x);
		scn.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		String txt = scn.next() + " ";
		int x = 0;
		for (int i = 0; i < txt.length(); i++) {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		}
		System.out.println(x);
		scn.close();
	}
} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		String txt = scn.next() + " ";
		int x = 0;
		for (int i = 0; i < txt.length(); i++) {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		}
		System.out.println(x);
		scn.close();
	} main {
		Scanner scn = new Scanner(System.in);
		String txt = scn.next() + " ";
		int x = 0;
		for (int i = 0; i < txt.length(); i++) {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		}
		System.out.println(x);
		scn.close();
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) String txt = scn.next() + " "; txt scn.next() + " " scn.next() scn.next scn " " int x = 0; x 0 for (int i = 0; i < txt.length(); i++) {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		} int i = 0; int i = 0; i 0 i < txt.length() i txt.length() txt.length txt i++ i++ i {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		} {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		} switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			} txt.charAt(i) txt.charAt txt i case 'A': 'A' case 'A': case 'C': 'C' case 'C': case 'T': 'T' case 'T': case 'G': 'G' case 'G': for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				} int j = i; int j = i; j i j < txt.length() j txt.length() txt.length txt j++ j++ j {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				} {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				} switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					} txt.charAt(j) txt.charAt txt j case 'A': 'A' case 'A': case 'C': 'C' case 'C': case 'T': 'T' case 'T': case 'G': 'G' case 'G': continue; default: default: if (x < j - i) {
							x = j - i;
						} x < j - i x j - i j i {
							x = j - i;
						} x = j - i x j - i j i i = j i j break; System.out.println(x) System.out.println System.out System System.out x scn.close() scn.close scn String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		String txt = scn.next() + " ";
		int x = 0;
		for (int i = 0; i < txt.length(); i++) {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		}
		System.out.println(x);
		scn.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		String txt = scn.next() + " ";
		int x = 0;
		for (int i = 0; i < txt.length(); i++) {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		}
		System.out.println(x);
		scn.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		String txt = scn.next() + " ";
		int x = 0;
		for (int i = 0; i < txt.length(); i++) {
			switch (txt.charAt(i)) {
			case 'A':
			case 'C':
			case 'T':
			case 'G':
				for (int j = i; j < txt.length(); j++) {
					switch (txt.charAt(j)) {
					case 'A':
					case 'C':
					case 'T':
					case 'G':
						continue;
					default:
						if (x < j - i) {
							x = j - i;
						}
					}
					i = j;
					break;
				}
			}
		}
		System.out.println(x);
		scn.close();
	}
}