import java.util.Scanner;

public class Main {

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

		// A C G T
		int max = 0;
		int temp = 0;
		String[] s = sample.split("");

		for(String a : s){
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		}
		System.out.println(max);
	}
} import java.util.Scanner; Scanner java.util public class Main {

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

		// A C G T
		int max = 0;
		int temp = 0;
		String[] s = sample.split("");

		for(String a : s){
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		}
		System.out.println(max);
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String sample = scanner.nextLine();

		// A C G T
		int max = 0;
		int temp = 0;
		String[] s = sample.split("");

		for(String a : s){
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		}
		System.out.println(max);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String sample = scanner.nextLine();

		// A C G T
		int max = 0;
		int temp = 0;
		String[] s = sample.split("");

		for(String a : s){
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		}
		System.out.println(max);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String sample = scanner.nextLine(); sample scanner.nextLine() scanner.nextLine scanner int max = 0; max 0 int temp = 0; temp 0 String[] s = sample.split(""); s sample.split("") sample.split sample "" for(String a : s){
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		} String a s {
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		} {
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		} if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			} a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T") a.equals("C") a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T") a.equals("A") a.equals a "A" a.equals("G") a.equals a "G" a.equals("C") a.equals a "C" a.equals("T") a.equals a "T" {
				temp++;
				if(temp > max){
					max = temp;
				}
			} temp++ temp if(temp > max){
					max = temp;
				} temp > max temp max {
					max = temp;
				} max = temp max temp {
				if(temp > max){
					max = temp;
				}
				temp = 0;
			} if(temp > max){
					max = temp;
				} temp > max temp max {
					max = temp;
				} max = temp max temp temp = 0 temp 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 scanner = new Scanner(System.in);
		String sample = scanner.nextLine();

		// A C G T
		int max = 0;
		int temp = 0;
		String[] s = sample.split("");

		for(String a : s){
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		}
		System.out.println(max);
	}
} public class Main {

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

		// A C G T
		int max = 0;
		int temp = 0;
		String[] s = sample.split("");

		for(String a : s){
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		}
		System.out.println(max);
	}
} Main
import java.util.Scanner;

public class Main {

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

		// A C G T
		int max = 0;
		int temp = 0;
		String[] s = sample.split("");

		for(String a : s){
			if(a.equals("A") || a.equals("G") || a.equals("C") || a.equals("T")){
				temp++;
				if(temp > max){
					max = temp;
				}
			}else{
				if(temp > max){
					max = temp;
				}
				temp = 0;
			}
		}
		System.out.println(max);
	}
}
