import java.util.Scanner;

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

		String str = stdIn.next();
		String[] acgtArray = str.split("[^ACGT]");
		stdIn.close();

		int max = 0;
		for (String acgt : acgtArray) {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		}

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

		String str = stdIn.next();
		String[] acgtArray = str.split("[^ACGT]");
		stdIn.close();

		int max = 0;
		for (String acgt : acgtArray) {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		}

		System.out.println(max);
	}
} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		String str = stdIn.next();
		String[] acgtArray = str.split("[^ACGT]");
		stdIn.close();

		int max = 0;
		for (String acgt : acgtArray) {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		}

		System.out.println(max);
	} main {
		Scanner stdIn = new Scanner(System.in);

		String str = stdIn.next();
		String[] acgtArray = str.split("[^ACGT]");
		stdIn.close();

		int max = 0;
		for (String acgt : acgtArray) {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		}

		System.out.println(max);
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String str = stdIn.next(); str stdIn.next() stdIn.next stdIn String[] acgtArray = str.split("[^ACGT]"); acgtArray str.split("[^ACGT]") str.split str "[^ACGT]" stdIn.close() stdIn.close stdIn int max = 0; max 0 for (String acgt : acgtArray) {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		} String acgt acgtArray {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		} {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		} int len = acgt.length(); len acgt.length() acgt.length acgt if(max < len) {
				max = len;
			} max < len max len {
				max = len;
			} max = len max len System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		String str = stdIn.next();
		String[] acgtArray = str.split("[^ACGT]");
		stdIn.close();

		int max = 0;
		for (String acgt : acgtArray) {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		}

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

		String str = stdIn.next();
		String[] acgtArray = str.split("[^ACGT]");
		stdIn.close();

		int max = 0;
		for (String acgt : acgtArray) {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		}

		System.out.println(max);
	}
} Main
import java.util.Scanner;

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

		String str = stdIn.next();
		String[] acgtArray = str.split("[^ACGT]");
		stdIn.close();

		int max = 0;
		for (String acgt : acgtArray) {
			int len = acgt.length();
			if(max < len) {
				max = len;
			}
		}

		System.out.println(max);
	}
}
