
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);

	}

}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz