
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Pattern p = Pattern.compile("[ATCG]+");
		Matcher m = p.matcher(s);
		int length = 0;
		while(m.find()) {
			int l = m.group().length();
			if(length < l)
				length = l;
		}
		System.out.println(length);
	}
} import java.util.Scanner; Scanner java.util import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Pattern p = Pattern.compile("[ATCG]+");
		Matcher m = p.matcher(s);
		int length = 0;
		while(m.find()) {
			int l = m.group().length();
			if(length < l)
				length = l;
		}
		System.out.println(length);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Pattern p = Pattern.compile("[ATCG]+");
		Matcher m = p.matcher(s);
		int length = 0;
		while(m.find()) {
			int l = m.group().length();
			if(length < l)
				length = l;
		}
		System.out.println(length);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Pattern p = Pattern.compile("[ATCG]+");
		Matcher m = p.matcher(s);
		int length = 0;
		while(m.find()) {
			int l = m.group().length();
			if(length < l)
				length = l;
		}
		System.out.println(length);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc Pattern p = Pattern.compile("[ATCG]+"); p Pattern.compile("[ATCG]+") Pattern.compile Pattern "[ATCG]+" Matcher m = p.matcher(s); m p.matcher(s) p.matcher p s int length = 0; length 0 while(m.find()) {
			int l = m.group().length();
			if(length < l)
				length = l;
		} m.find() m.find m {
			int l = m.group().length();
			if(length < l)
				length = l;
		} int l = m.group().length(); l m.group().length() m.group().length m.group() m.group m if(length < l)
				length = l; length < l length l length = l length l System.out.println(length) System.out.println System.out System System.out length String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Pattern p = Pattern.compile("[ATCG]+");
		Matcher m = p.matcher(s);
		int length = 0;
		while(m.find()) {
			int l = m.group().length();
			if(length < l)
				length = l;
		}
		System.out.println(length);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Pattern p = Pattern.compile("[ATCG]+");
		Matcher m = p.matcher(s);
		int length = 0;
		while(m.find()) {
			int l = m.group().length();
			if(length < l)
				length = l;
		}
		System.out.println(length);
	}
} Main

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Pattern p = Pattern.compile("[ATCG]+");
		Matcher m = p.matcher(s);
		int length = 0;
		while(m.find()) {
			int l = m.group().length();
			if(length < l)
				length = l;
		}
		System.out.println(length);
	}
}