
import java.util.Scanner;

public class Main {

	private static Scanner sc;

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

		String b = sc.next();
		String[] ary = b.split("");
		int answer = 0;
		String ACGT = "ACGT";
		int x = 0;
		for (String str : ary) {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		}

		answer = Math.max(answer, x);

		System.out.println(answer);

	}

} import java.util.Scanner; Scanner java.util public class Main {

	private static Scanner sc;

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

		String b = sc.next();
		String[] ary = b.split("");
		int answer = 0;
		String ACGT = "ACGT";
		int x = 0;
		for (String str : ary) {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		}

		answer = Math.max(answer, x);

		System.out.println(answer);

	}

} Main private static Scanner sc; sc public static void main(String[] args) {
		sc = new Scanner(System.in);

		String b = sc.next();
		String[] ary = b.split("");
		int answer = 0;
		String ACGT = "ACGT";
		int x = 0;
		for (String str : ary) {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		}

		answer = Math.max(answer, x);

		System.out.println(answer);

	} main {
		sc = new Scanner(System.in);

		String b = sc.next();
		String[] ary = b.split("");
		int answer = 0;
		String ACGT = "ACGT";
		int x = 0;
		for (String str : ary) {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		}

		answer = Math.max(answer, x);

		System.out.println(answer);

	} sc = new Scanner(System.in) sc new Scanner(System.in) String b = sc.next(); b sc.next() sc.next sc String[] ary = b.split(""); ary b.split("") b.split b "" int answer = 0; answer 0 String ACGT = "ACGT"; ACGT "ACGT" int x = 0; x 0 for (String str : ary) {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		} String str ary {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		} {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		} if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			} ACGT.indexOf(str) >= 0 ACGT.indexOf(str) ACGT.indexOf ACGT str 0 {
				x++;
			} x++ x {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			} if (answer < x) {
					answer = x;
				} answer < x answer x {
					answer = x;
				} answer = x answer x x = 0 x 0 answer = Math.max(answer, x) answer Math.max(answer, x) Math.max Math answer x System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	private static Scanner sc;

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

		String b = sc.next();
		String[] ary = b.split("");
		int answer = 0;
		String ACGT = "ACGT";
		int x = 0;
		for (String str : ary) {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		}

		answer = Math.max(answer, x);

		System.out.println(answer);

	}

} public class Main {

	private static Scanner sc;

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

		String b = sc.next();
		String[] ary = b.split("");
		int answer = 0;
		String ACGT = "ACGT";
		int x = 0;
		for (String str : ary) {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		}

		answer = Math.max(answer, x);

		System.out.println(answer);

	}

} Main

import java.util.Scanner;

public class Main {

	private static Scanner sc;

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

		String b = sc.next();
		String[] ary = b.split("");
		int answer = 0;
		String ACGT = "ACGT";
		int x = 0;
		for (String str : ary) {
			if (ACGT.indexOf(str) >= 0) {
				x++;
			} else {
				if (answer < x) {
					answer = x;
				}
				x = 0;
			}
		}

		answer = Math.max(answer, x);

		System.out.println(answer);

	}

}
