import java.util.*;
//import java.util.stream.Collectors;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int longest = 0;
		int count = 0;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		}
		System.out.println(longest);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int longest = 0;
		int count = 0;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		}
		System.out.println(longest);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int longest = 0;
		int count = 0;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		}
		System.out.println(longest);
	} main {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int longest = 0;
		int count = 0;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		}
		System.out.println(longest);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int longest = 0; longest 0 int count = 0; count 0 for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		} {
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		} if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			} s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T' s.charAt(i) == 'G' s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T' s.charAt(i) == 'A' s.charAt(i) s.charAt s i 'A' s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' s.charAt(i) == 'G' s.charAt(i) s.charAt s i 'G' s.charAt(i) == 'T' s.charAt(i) s.charAt s i 'T' {
				count++;
				if(count > longest){
					longest = count;
				}
			} count++ count if(count > longest){
					longest = count;
				} count > longest count longest {
					longest = count;
				} longest = count longest count {
				count = 0;
			} count = 0 count 0 System.out.println(longest) System.out.println System.out System System.out longest String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int longest = 0;
		int count = 0;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		}
		System.out.println(longest);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int longest = 0;
		int count = 0;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		}
		System.out.println(longest);
	}
} Main
import java.util.*;
//import java.util.stream.Collectors;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int longest = 0;
		int count = 0;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'G' || s.charAt(i) == 'T'){
				count++;
				if(count > longest){
					longest = count;
				}
			}else{
				count = 0;
			}
		}
		System.out.println(longest);
	}
}
