

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		char[] str = sc.next().toCharArray();

		int result = 0;

		int tmpCount = 0;
		for(int i = 0; i < str.length; i++){
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		}

		System.out.println(result);
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		char[] str = sc.next().toCharArray();

		int result = 0;

		int tmpCount = 0;
		for(int i = 0; i < str.length; i++){
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		}

		System.out.println(result);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		char[] str = sc.next().toCharArray();

		int result = 0;

		int tmpCount = 0;
		for(int i = 0; i < str.length; i++){
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		}

		System.out.println(result);
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		char[] str = sc.next().toCharArray();

		int result = 0;

		int tmpCount = 0;
		for(int i = 0; i < str.length; i++){
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		}

		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] str = sc.next().toCharArray(); str sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int result = 0; result 0 int tmpCount = 0; tmpCount 0 for(int i = 0; i < str.length; i++){
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		} int i = 0; int i = 0; i 0 i < str.length i str.length str str.length i++ i++ i {
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		} {
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		} char tmpC = str[i]; tmpC str[i] str i if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			} str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G' str[i] != 'T' str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G' str[i] != 'A' str[i] str i 'A' str[i] != 'C' str[i] str i 'C' str[i] != 'T' str[i] str i 'T' str[i] != 'G' str[i] str i 'G' {
				tmpCount = 0;
				continue;
			} tmpCount = 0 tmpCount 0 continue; tmpCount++ tmpCount result = Math.max(result, tmpCount) result Math.max(result, tmpCount) Math.max Math result tmpCount System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		char[] str = sc.next().toCharArray();

		int result = 0;

		int tmpCount = 0;
		for(int i = 0; i < str.length; i++){
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		}

		System.out.println(result);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		char[] str = sc.next().toCharArray();

		int result = 0;

		int tmpCount = 0;
		for(int i = 0; i < str.length; i++){
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		}

		System.out.println(result);
	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		char[] str = sc.next().toCharArray();

		int result = 0;

		int tmpCount = 0;
		for(int i = 0; i < str.length; i++){
			char tmpC = str[i];

			if(str[i] != 'A' && str[i] != 'C' && str[i] != 'T' && str[i] != 'G'){
				tmpCount = 0;
				continue;
			}
			tmpCount++;
			result = Math.max(result, tmpCount);
		}

		System.out.println(result);
	}

}
