import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	int max = 0;
    	int tmp = 0;
    	for(int i = 0; i < str.length(); i++){
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	}
    	System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	int max = 0;
    	int tmp = 0;
    	for(int i = 0; i < str.length(); i++){
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	}
    	System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	int max = 0;
    	int tmp = 0;
    	for(int i = 0; i < str.length(); i++){
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	}
    	System.out.println(max);
    } main {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	int max = 0;
    	int tmp = 0;
    	for(int i = 0; i < str.length(); i++){
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	}
    	System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc sc.close() sc.close sc int max = 0; max 0 int tmp = 0; tmp 0 for(int i = 0; i < str.length(); i++){
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	} {
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	} char c = str.charAt(i); c str.charAt(i) str.charAt str i if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		} c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'G' c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'A' c 'A' c == 'C' c 'C' c == 'G' c 'G' c == 'T' c 'T' {
    			tmp++;
    		} tmp++ tmp {
    			tmp = 0;
    		} tmp = 0 tmp 0 if(max < tmp) max = tmp; max < tmp max tmp max = tmp max tmp 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) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	int max = 0;
    	int tmp = 0;
    	for(int i = 0; i < str.length(); i++){
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	}
    	System.out.println(max);
    }
} public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	int max = 0;
    	int tmp = 0;
    	for(int i = 0; i < str.length(); i++){
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	}
    	System.out.println(max);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	String str = sc.next();
    	sc.close();
    	int max = 0;
    	int tmp = 0;
    	for(int i = 0; i < str.length(); i++){
    		char c = str.charAt(i);
    		if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
    			tmp++;
    		}else{
    			tmp = 0;
    		}
    		if(max < tmp) max = tmp;
    	}
    	System.out.println(max);
    }
}