import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String s = scanner.nextLine();

		String temp = null;

		int ans1 = 0;
		int ans2 = 0;

		for(int i = 0; i < s.length(); i++) {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		}

		System.out.println(ans2);


	}

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

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String s = scanner.nextLine();

		String temp = null;

		int ans1 = 0;
		int ans2 = 0;

		for(int i = 0; i < s.length(); i++) {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		}

		System.out.println(ans2);


	}

} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String s = scanner.nextLine();

		String temp = null;

		int ans1 = 0;
		int ans2 = 0;

		for(int i = 0; i < s.length(); i++) {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		}

		System.out.println(ans2);


	} main {

		Scanner scanner = new Scanner(System.in);

		String s = scanner.nextLine();

		String temp = null;

		int ans1 = 0;
		int ans2 = 0;

		for(int i = 0; i < s.length(); i++) {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		}

		System.out.println(ans2);


	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner String temp = null; temp null int ans1 = 0; ans1 0 int ans2 = 0; ans2 0 for(int i = 0; i < s.length(); i++) {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		} {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		} temp = String.valueOf(s.charAt(i)) temp String.valueOf(s.charAt(i)) String.valueOf String s.charAt(i) s.charAt s i if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			} temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T") temp.equals("G") temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T") temp.equals("A") temp.equals temp "A" temp.equals("C") temp.equals temp "C" temp.equals("G") temp.equals temp "G" temp.equals("T") temp.equals temp "T" {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			} for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				} int j = i; int j = i; j i j < s.length() j s.length() s.length s j ++ j ++ j {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				} {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				} temp = String.valueOf(s.charAt(j)) temp String.valueOf(s.charAt(j)) String.valueOf String s.charAt(j) s.charAt s j if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					} temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T") temp.equals("G") temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T") temp.equals("A") temp.equals temp "A" temp.equals("C") temp.equals temp "C" temp.equals("G") temp.equals temp "G" temp.equals("T") temp.equals temp "T" {
					ans1++;
					} ans1++ ans1 {
						break;
					} break; i += ans1 i ans1 ans2 = Math.max(ans1, ans2) ans2 Math.max(ans1, ans2) Math.max Math ans1 ans2 ans1 = 0 ans1 0 System.out.println(ans2) System.out.println System.out System System.out ans2 String[] args args public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String s = scanner.nextLine();

		String temp = null;

		int ans1 = 0;
		int ans2 = 0;

		for(int i = 0; i < s.length(); i++) {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		}

		System.out.println(ans2);


	}

} public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String s = scanner.nextLine();

		String temp = null;

		int ans1 = 0;
		int ans2 = 0;

		for(int i = 0; i < s.length(); i++) {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		}

		System.out.println(ans2);


	}

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String s = scanner.nextLine();

		String temp = null;

		int ans1 = 0;
		int ans2 = 0;

		for(int i = 0; i < s.length(); i++) {

			temp = String.valueOf(s.charAt(i));

			if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {

				for(int j = i; j < s.length(); j ++) {
					temp = String.valueOf(s.charAt(j));

					if(temp.equals("A") || temp.equals("C")|| temp.equals("G")|| temp.equals("T")) {
					ans1++;
					}else {
						break;
					}

				}

			}

			i += ans1;
			ans2 = Math.max(ans1, ans2);
			ans1 = 0;


		}

		System.out.println(ans2);


	}

}
