import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		ACGT acgt = new ACGT(s);
		int ans = acgt.calcACGT();
		System.out.println(ans);
	}
	
}

class ACGT {
	String s;
	public ACGT(String s) {
		this.s = s;
	}
	int calcACGT() {
		int length = 0;
		int longest = 0;
		for (int i = 0; i < s.length(); i++) {
			if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			}
		}
		return Math.max(length, longest);
	}
	boolean isACGT(char c) {
		switch (c) {
		case 'A':
		case 'C':
		case 'G':
		case 'T':
			return true;
		}
		return false;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		ACGT acgt = new ACGT(s);
		int ans = acgt.calcACGT();
		System.out.println(ans);
	}
	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		ACGT acgt = new ACGT(s);
		int ans = acgt.calcACGT();
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		ACGT acgt = new ACGT(s);
		int ans = acgt.calcACGT();
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc ACGT acgt = new ACGT(s); acgt new ACGT(s) int ans = acgt.calcACGT(); ans acgt.calcACGT() acgt.calcACGT acgt System.out.println(ans) System.out.println System.out System System.out ans String[] args args class ACGT {
	String s;
	public ACGT(String s) {
		this.s = s;
	}
	int calcACGT() {
		int length = 0;
		int longest = 0;
		for (int i = 0; i < s.length(); i++) {
			if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			}
		}
		return Math.max(length, longest);
	}
	boolean isACGT(char c) {
		switch (c) {
		case 'A':
		case 'C':
		case 'G':
		case 'T':
			return true;
		}
		return false;
	}
} ACGT String s; s public ACGT(String s) {
		this.s = s;
	} ACGT {
		this.s = s;
	} this.s = s this.s this this.s s String s s int calcACGT() {
		int length = 0;
		int longest = 0;
		for (int i = 0; i < s.length(); i++) {
			if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			}
		}
		return Math.max(length, longest);
	} calcACGT {
		int length = 0;
		int longest = 0;
		for (int i = 0; i < s.length(); i++) {
			if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			}
		}
		return Math.max(length, longest);
	} int length = 0; length 0 int longest = 0; longest 0 for (int i = 0; i < s.length(); i++) {
			if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			}
		} {
			if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			}
		} if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			} isACGT(s.charAt(i)) isACGT s.charAt(i) s.charAt s i {
				length++;
			} length++ length {
				longest = Math.max(length, longest);
				length = 0;
			} longest = Math.max(length, longest) longest Math.max(length, longest) Math.max Math length longest length = 0 length 0 return Math.max(length, longest); Math.max(length, longest) Math.max Math length longest boolean isACGT(char c) {
		switch (c) {
		case 'A':
		case 'C':
		case 'G':
		case 'T':
			return true;
		}
		return false;
	} isACGT {
		switch (c) {
		case 'A':
		case 'C':
		case 'G':
		case 'T':
			return true;
		}
		return false;
	} switch (c) {
		case 'A':
		case 'C':
		case 'G':
		case 'T':
			return true;
		} c case 'A': 'A' case 'A': case 'C': 'C' case 'C': case 'G': 'G' case 'G': case 'T': 'T' case 'T': return true; true return false; false char c c public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		ACGT acgt = new ACGT(s);
		int ans = acgt.calcACGT();
		System.out.println(ans);
	}
	
} public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		ACGT acgt = new ACGT(s);
		int ans = acgt.calcACGT();
		System.out.println(ans);
	}
	
} Main
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		ACGT acgt = new ACGT(s);
		int ans = acgt.calcACGT();
		System.out.println(ans);
	}
	
}

class ACGT {
	String s;
	public ACGT(String s) {
		this.s = s;
	}
	int calcACGT() {
		int length = 0;
		int longest = 0;
		for (int i = 0; i < s.length(); i++) {
			if (isACGT(s.charAt(i))) {
				length++;
			} else {
				longest = Math.max(length, longest);
				length = 0;
			}
		}
		return Math.max(length, longest);
	}
	boolean isACGT(char c) {
		switch (c) {
		case 'A':
		case 'C':
		case 'G':
		case 'T':
			return true;
		}
		return false;
	}
}
