import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char S1[] = S.toCharArray();
		int max_count = 0;
		int count = 0;
		for(int i = 0; i<S.length(); i++) {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		}
		System.out.println(max_count);
		
		
		
    }

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char S1[] = S.toCharArray();
		int max_count = 0;
		int count = 0;
		for(int i = 0; i<S.length(); i++) {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		}
		System.out.println(max_count);
		
		
		
    }

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char S1[] = S.toCharArray();
		int max_count = 0;
		int count = 0;
		for(int i = 0; i<S.length(); i++) {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		}
		System.out.println(max_count);
		
		
		
    } main {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char S1[] = S.toCharArray();
		int max_count = 0;
		int count = 0;
		for(int i = 0; i<S.length(); i++) {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		}
		System.out.println(max_count);
		
		
		
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char S1[] = S.toCharArray(); S1 S.toCharArray() S.toCharArray S int max_count = 0; max_count 0 int count = 0; count 0 for(int i = 0; i<S.length(); i++) {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		} int i = 0; int i = 0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		} {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		} if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			} S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T' S1[i] == 'G' S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T' S1[i] == 'A' S1[i] S1 i 'A' S1[i] == 'C' S1[i] S1 i 'C' S1[i] == 'G' S1[i] S1 i 'G' S1[i] == 'T' S1[i] S1 i 'T' {
				count++;
			} count++ count {
				count = 0;
			} count = 0 count 0 if(count > max_count) {
				max_count = count;
				
			} count > max_count count max_count {
				max_count = count;
				
			} max_count = count max_count count System.out.println(max_count) System.out.println System.out System System.out max_count String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char S1[] = S.toCharArray();
		int max_count = 0;
		int count = 0;
		for(int i = 0; i<S.length(); i++) {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		}
		System.out.println(max_count);
		
		
		
    }

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char S1[] = S.toCharArray();
		int max_count = 0;
		int count = 0;
		for(int i = 0; i<S.length(); i++) {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		}
		System.out.println(max_count);
		
		
		
    }

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char S1[] = S.toCharArray();
		int max_count = 0;
		int count = 0;
		for(int i = 0; i<S.length(); i++) {
			if(S1[i] == 'A' || S1[i] == 'C' ||S1[i] == 'G' ||S1[i] == 'T') {
				count++;
			}
			else {
				count = 0;
			}
			if(count > max_count) {
				max_count = count;
				
			}
			
		}
		System.out.println(max_count);
		
		
		
    }

}