import java.util.*;
public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			List<String> atcg = new ArrayList<String>();
			atcg.add("A");
			atcg.add("T");
			atcg.add("C");
			atcg.add("G");
			String []s = sc.next().split("");
			int len = 0;
			int max = 0;
			for(int i = 0;i<s.length;i++) {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			}
			System.out.println(max);
			sc.close();
			
		}
	public static void main(String[] args) {
		solve();

	}

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

		static void solve() {
			Scanner sc = new Scanner(System.in);
			List<String> atcg = new ArrayList<String>();
			atcg.add("A");
			atcg.add("T");
			atcg.add("C");
			atcg.add("G");
			String []s = sc.next().split("");
			int len = 0;
			int max = 0;
			for(int i = 0;i<s.length;i++) {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			}
			System.out.println(max);
			sc.close();
			
		}
	public static void main(String[] args) {
		solve();

	}

} Main static void solve() {
			Scanner sc = new Scanner(System.in);
			List<String> atcg = new ArrayList<String>();
			atcg.add("A");
			atcg.add("T");
			atcg.add("C");
			atcg.add("G");
			String []s = sc.next().split("");
			int len = 0;
			int max = 0;
			for(int i = 0;i<s.length;i++) {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			}
			System.out.println(max);
			sc.close();
			
		} solve {
			Scanner sc = new Scanner(System.in);
			List<String> atcg = new ArrayList<String>();
			atcg.add("A");
			atcg.add("T");
			atcg.add("C");
			atcg.add("G");
			String []s = sc.next().split("");
			int len = 0;
			int max = 0;
			for(int i = 0;i<s.length;i++) {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			}
			System.out.println(max);
			sc.close();
			
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<String> atcg = new ArrayList<String>(); atcg new ArrayList<String>() atcg.add("A") atcg.add atcg "A" atcg.add("T") atcg.add atcg "T" atcg.add("C") atcg.add atcg "C" atcg.add("G") atcg.add atcg "G" String []s = sc.next().split(""); s sc.next().split("") sc.next().split sc.next() sc.next sc "" int len = 0; len 0 int max = 0; max 0 for(int i = 0;i<s.length;i++) {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			} int i = 0; int i = 0; i 0 i<s.length i s.length s s.length i++ i++ i {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			} {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			} if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0; atcg.contains(s[i]) atcg.contains atcg s[i] s i {
						len++;
						if(len>max) {
							max = len;
						}
					} len++ len if(len>max) {
							max = len;
						} len>max len max {
							max = len;
						} max = len max len len = 0 len 0 System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc public static void main(String[] args) {
		solve();

	} main {
		solve();

	} solve() solve String[] args args public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			List<String> atcg = new ArrayList<String>();
			atcg.add("A");
			atcg.add("T");
			atcg.add("C");
			atcg.add("G");
			String []s = sc.next().split("");
			int len = 0;
			int max = 0;
			for(int i = 0;i<s.length;i++) {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			}
			System.out.println(max);
			sc.close();
			
		}
	public static void main(String[] args) {
		solve();

	}

} public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			List<String> atcg = new ArrayList<String>();
			atcg.add("A");
			atcg.add("T");
			atcg.add("C");
			atcg.add("G");
			String []s = sc.next().split("");
			int len = 0;
			int max = 0;
			for(int i = 0;i<s.length;i++) {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			}
			System.out.println(max);
			sc.close();
			
		}
	public static void main(String[] args) {
		solve();

	}

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

		static void solve() {
			Scanner sc = new Scanner(System.in);
			List<String> atcg = new ArrayList<String>();
			atcg.add("A");
			atcg.add("T");
			atcg.add("C");
			atcg.add("G");
			String []s = sc.next().split("");
			int len = 0;
			int max = 0;
			for(int i = 0;i<s.length;i++) {
					if(atcg.contains(s[i])) {
						len++;
						if(len>max) {
							max = len;
						}
					}
					else 
						len = 0;
			}
			System.out.println(max);
			sc.close();
			
		}
	public static void main(String[] args) {
		solve();

	}

}
