import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		int b = 0;

		char[] c = S.toCharArray();
		for (int i = 0; i < S.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		}
		if (b == 0) {
			System.out.println(S.length());
		} else {
			System.out.println(max);
		}
	}
} 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();
		sc.close();
		int a = 0;
		int max = 0;
		int b = 0;

		char[] c = S.toCharArray();
		for (int i = 0; i < S.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		}
		if (b == 0) {
			System.out.println(S.length());
		} else {
			System.out.println(max);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		int b = 0;

		char[] c = S.toCharArray();
		for (int i = 0; i < S.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		}
		if (b == 0) {
			System.out.println(S.length());
		} else {
			System.out.println(max);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		int b = 0;

		char[] c = S.toCharArray();
		for (int i = 0; i < S.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		}
		if (b == 0) {
			System.out.println(S.length());
		} else {
			System.out.println(max);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc int a = 0; a 0 int max = 0; max 0 int b = 0; b 0 char[] c = S.toCharArray(); c S.toCharArray() S.toCharArray S for (int i = 0; i < S.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		} {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		} if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			} c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' c[i] == 'G' c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T' c[i] == 'A' c[i] c i 'A' c[i] == 'C' c[i] c i 'C' c[i] == 'G' c[i] c i 'G' c[i] == 'T' c[i] c i 'T' {
				a++;
			} a++ a {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			} b = 1 b 1 if (max < a) {
					max = a;
				} max < a max a {
					max = a;
				} max = a max a a = 0 a 0 if (max < a) {
				max = a;
			} max < a max a {
				max = a;
			} max = a max a if (b == 0) {
			System.out.println(S.length());
		} else {
			System.out.println(max);
		} b == 0 b 0 {
			System.out.println(S.length());
		} System.out.println(S.length()) System.out.println System.out System System.out S.length() S.length S {
			System.out.println(max);
		} 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 sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		int b = 0;

		char[] c = S.toCharArray();
		for (int i = 0; i < S.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		}
		if (b == 0) {
			System.out.println(S.length());
		} else {
			System.out.println(max);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		int b = 0;

		char[] c = S.toCharArray();
		for (int i = 0; i < S.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		}
		if (b == 0) {
			System.out.println(S.length());
		} else {
			System.out.println(max);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		int a = 0;
		int max = 0;
		int b = 0;

		char[] c = S.toCharArray();
		for (int i = 0; i < S.length(); i++) {
			if (c[i] == 'A' || c[i] == 'C' || c[i] == 'G' || c[i] == 'T') {
				a++;
			} else {
				b = 1;
				if (max < a) {
					max = a;
				}
				a = 0;
			}
			if (max < a) {
				max = a;
			}
		}
		if (b == 0) {
			System.out.println(S.length());
		} else {
			System.out.println(max);
		}
	}
}
