import java.util.Scanner;

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

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