
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		String S = scan.nextLine();
		int length = 0;
		int max = 0;

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

		String S = scan.nextLine();
		int length = 0;
		int max = 0;

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

		String S = scan.nextLine();
		int length = 0;
		int max = 0;

		for (int i = 0; i < S.length(); i++) {
			if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			}
		}
		System.out.println(max);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);

		String S = scan.nextLine();
		int length = 0;
		int max = 0;

		for (int i = 0; i < S.length(); i++) {
			if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			}
		}
		System.out.println(max);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.nextLine(); S scan.nextLine() scan.nextLine scan int length = 0; length 0 int max = 0; max 0 for (int i = 0; i < S.length(); i++) {
			if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			}
		} {
			if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			}
		} if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			} S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' S.charAt(i) == 'G' S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' S.charAt(i) == 'G' S.charAt(i) S.charAt S i 'G' S.charAt(i) == 'T' S.charAt(i) S.charAt S i 'T' {
				length++;
				if (max < length) {
					max = length;
				}
			} length++ length if (max < length) {
					max = length;
				} max < length max length {
					max = length;
				} max = length max length {
				length = 0;
			} length = 0 length 0 System.out.println(max) System.out.println System.out System System.out max scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		String S = scan.nextLine();
		int length = 0;
		int max = 0;

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

		String S = scan.nextLine();
		int length = 0;
		int max = 0;

		for (int i = 0; i < S.length(); i++) {
			if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			}
		}
		System.out.println(max);
		scan.close();
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		String S = scan.nextLine();
		int length = 0;
		int max = 0;

		for (int i = 0; i < S.length(); i++) {
			if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			}
		}
		System.out.println(max);
		scan.close();
	}
}
