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