
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split("");

		int max = 0;
		int count = 0;
		for(int i = 0; i < lines.length; i++) {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		}

		System.out.println(max);
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split("");

		int max = 0;
		int count = 0;
		for(int i = 0; i < lines.length; i++) {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		}

		System.out.println(max);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split("");

		int max = 0;
		int count = 0;
		for(int i = 0; i < lines.length; i++) {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		}

		System.out.println(max);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split("");

		int max = 0;
		int count = 0;
		for(int i = 0; i < lines.length; i++) {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		}

		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] lines = line.split(""); lines line.split("") line.split line "" int max = 0; max 0 int count = 0; count 0 for(int i = 0; i < lines.length; i++) {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		} int i = 0; int i = 0; i 0 i < lines.length i lines.length lines lines.length i++ i++ i {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		} {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		} if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			} lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G") lines[i].equals("C") lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G") lines[i].equals("A") lines[i].equals lines[i] lines i "A" lines[i].equals("T") lines[i].equals lines[i] lines i "T" lines[i].equals("C") lines[i].equals lines[i] lines i "C" lines[i].equals("G") lines[i].equals lines[i] lines i "G" {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			} count++ count if(i == lines.length - 1 && max < count) {
					max = count;
				} i == lines.length - 1 && max < count i == lines.length - 1 i lines.length - 1 lines.length lines lines.length 1 max < count max count {
					max = count;
				} max = count max count {
				if(max < count) {
					max = count;
				}
				count = 0;
			} if(max < count) {
					max = count;
				} max < count max count {
					max = count;
				} max = count max count count = 0 count 0 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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split("");

		int max = 0;
		int count = 0;
		for(int i = 0; i < lines.length; i++) {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		}

		System.out.println(max);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split("");

		int max = 0;
		int count = 0;
		for(int i = 0; i < lines.length; i++) {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		}

		System.out.println(max);
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split("");

		int max = 0;
		int count = 0;
		for(int i = 0; i < lines.length; i++) {
			if(lines[i].equals("A") || lines[i].equals("T") || lines[i].equals("C") || lines[i].equals("G")) {
				count++;
				if(i == lines.length - 1 && max < count) {
					max = count;
				}
			}else {
				if(max < count) {
					max = count;
				}
				count = 0;
			}
		}

		System.out.println(max);
	}

}
