import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int answer = 0;
		int answerKoho = 0;
		for(int i =0;i < s.length;i++) {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		}
		System.out.println(answer);

	}
} 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().split("");
		int answer = 0;
		int answerKoho = 0;
		for(int i =0;i < s.length;i++) {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		}
		System.out.println(answer);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int answer = 0;
		int answerKoho = 0;
		for(int i =0;i < s.length;i++) {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		}
		System.out.println(answer);

	} main {
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int answer = 0;
		int answerKoho = 0;
		for(int i =0;i < s.length;i++) {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		}
		System.out.println(answer);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] s = sc.next().split(""); s sc.next().split("") sc.next().split sc.next() sc.next sc "" int answer = 0; answer 0 int answerKoho = 0; answerKoho 0 for(int i =0;i < s.length;i++) {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		} int i =0; int i =0; i 0 i < s.length i s.length s s.length i++ i++ i {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		} {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		} if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			} s[i].equals("A") s[i].equals s[i] s i "A" {
				answerKoho++;
			} answerKoho++ answerKoho if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			} s[i].equals("C") s[i].equals s[i] s i "C" {
				answerKoho++;
			} answerKoho++ answerKoho if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			} s[i].equals("G") s[i].equals s[i] s i "G" {
				answerKoho++;
			} answerKoho++ answerKoho if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			} s[i].equals("T") s[i].equals s[i] s i "T" {
				answerKoho++;
			} answerKoho++ answerKoho {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			} if(answerKoho > answer) {
					answer = answerKoho;
				} answerKoho > answer answerKoho answer {
					answer = answerKoho;
				} answer = answerKoho answer answerKoho answerKoho = 0 answerKoho 0 if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			} i == s.length-1 i s.length-1 s.length s s.length 1 {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			} if(answerKoho > answer) {
					answer = answerKoho;
				} answerKoho > answer answerKoho answer {
					answer = answerKoho;
				} answer = answerKoho answer answerKoho System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int answer = 0;
		int answerKoho = 0;
		for(int i =0;i < s.length;i++) {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		}
		System.out.println(answer);

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int answer = 0;
		int answerKoho = 0;
		for(int i =0;i < s.length;i++) {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		}
		System.out.println(answer);

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = sc.next().split("");
		int answer = 0;
		int answerKoho = 0;
		for(int i =0;i < s.length;i++) {
			if(s[i].equals("A")) {
				answerKoho++;
			}
			else if(s[i].equals("C")) {
				answerKoho++;
			}
			else if(s[i].equals("G")) {
				answerKoho++;
			}
			else if(s[i].equals("T")) {
				answerKoho++;
			}else {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
				answerKoho = 0;
			}
			if(i == s.length-1) {
				if(answerKoho > answer) {
					answer = answerKoho;
				}
			}
		}
		System.out.println(answer);

	}
}