import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		char[] chars = s.toCharArray();
		
		// 計算
		int result = 0;
		int cnt  = 0;
		for(int i = 0; i < s.length(); i++){
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		}
		result = max(result, cnt);

		// 出力
		System.out.println(result);
        
	}
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.math.BigInteger; BigInteger java.math public class Main {
    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		char[] chars = s.toCharArray();
		
		// 計算
		int result = 0;
		int cnt  = 0;
		for(int i = 0; i < s.length(); i++){
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		}
		result = max(result, cnt);

		// 出力
		System.out.println(result);
        
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		char[] chars = s.toCharArray();
		
		// 計算
		int result = 0;
		int cnt  = 0;
		for(int i = 0; i < s.length(); i++){
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		}
		result = max(result, cnt);

		// 出力
		System.out.println(result);
        
	} main {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		char[] chars = s.toCharArray();
		
		// 計算
		int result = 0;
		int cnt  = 0;
		for(int i = 0; i < s.length(); i++){
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		}
		result = max(result, cnt);

		// 出力
		System.out.println(result);
        
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] chars = s.toCharArray(); chars s.toCharArray() s.toCharArray s int result = 0; result 0 int cnt  = 0; cnt 0 for(int i = 0; i < s.length(); i++){
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		} {
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		} char c = s.charAt(i); c s.charAt(i) s.charAt s i if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    } c == 'A' || c == 'T' || c == 'C' || c == 'G' c == 'C' c == 'A' || c == 'T' || c == 'C' || c == 'G' c == 'A' c 'A' c == 'T' c 'T' c == 'C' c 'C' c == 'G' c 'G' {
		        cnt++;
		        continue;
		    } cnt++ cnt continue; result = max(result, cnt) result max(result, cnt) max result cnt cnt = 0 cnt 0 result = max(result, cnt) result max(result, cnt) max result cnt 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){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		char[] chars = s.toCharArray();
		
		// 計算
		int result = 0;
		int cnt  = 0;
		for(int i = 0; i < s.length(); i++){
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		}
		result = max(result, cnt);

		// 出力
		System.out.println(result);
        
	}
} public class Main {
    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		char[] chars = s.toCharArray();
		
		// 計算
		int result = 0;
		int cnt  = 0;
		for(int i = 0; i < s.length(); i++){
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		}
		result = max(result, cnt);

		// 出力
		System.out.println(result);
        
	}
} Main
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		char[] chars = s.toCharArray();
		
		// 計算
		int result = 0;
		int cnt  = 0;
		for(int i = 0; i < s.length(); i++){
		    char c = s.charAt(i);
		    if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
		        cnt++;
		        continue;
		    }
		    result = max(result, cnt);
		    cnt = 0;
		}
		result = max(result, cnt);

		// 出力
		System.out.println(result);
        
	}
}
