import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String s = sc.next();
		String split[] = s.split("");
		int i;
        int count = 0,ans = 0;
        
      	for(i = 0;i < s.length();i++){
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        }
        if(ans < count){
              ans = count;
        }
        System.out.println(ans);   
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String s = sc.next();
		String split[] = s.split("");
		int i;
        int count = 0,ans = 0;
        
      	for(i = 0;i < s.length();i++){
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        }
        if(ans < count){
              ans = count;
        }
        System.out.println(ans);   
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String s = sc.next();
		String split[] = s.split("");
		int i;
        int count = 0,ans = 0;
        
      	for(i = 0;i < s.length();i++){
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        }
        if(ans < count){
              ans = count;
        }
        System.out.println(ans);   
    } main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String s = sc.next();
		String split[] = s.split("");
		int i;
        int count = 0,ans = 0;
        
      	for(i = 0;i < s.length();i++){
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        }
        if(ans < count){
              ans = count;
        }
        System.out.println(ans);   
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String split[] = s.split(""); split s.split("") s.split s "" int i; i int count = 0 count 0 ans = 0; ans 0 for(i = 0;i < s.length();i++){
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        } i = 0; i = 0 i 0 i < s.length() i s.length() s.length s i++ i++ i {
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        } {
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        } if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          } split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") split[i].equals("G") split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") split[i].equals("A") split[i].equals split[i] split i "A" split[i].equals("C") split[i].equals split[i] split i "C" split[i].equals("G") split[i].equals split[i] split i "G" split[i].equals("T") split[i].equals split[i] split i "T" {
            count += 1;  
          } count += 1 count 1 {
            if(ans < count){
              ans = count;
            }
            count = 0;
          } if(ans < count){
              ans = count;
            } ans < count ans count {
              ans = count;
            } ans = count ans count count = 0 count 0 if(ans < count){
              ans = count;
        } ans < count ans count {
              ans = count;
        } ans = count ans count 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 s = sc.next();
		String split[] = s.split("");
		int i;
        int count = 0,ans = 0;
        
      	for(i = 0;i < s.length();i++){
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        }
        if(ans < count){
              ans = count;
        }
        System.out.println(ans);   
    }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String s = sc.next();
		String split[] = s.split("");
		int i;
        int count = 0,ans = 0;
        
      	for(i = 0;i < s.length();i++){
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        }
        if(ans < count){
              ans = count;
        }
        System.out.println(ans);   
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String s = sc.next();
		String split[] = s.split("");
		int i;
        int count = 0,ans = 0;
        
      	for(i = 0;i < s.length();i++){
          if(split[i].equals("A") || split[i].equals("C") || split[i].equals("G") || split[i].equals("T") ){
            count += 1;  
          }else{
            if(ans < count){
              ans = count;
            }
            count = 0;
          }
        }
        if(ans < count){
              ans = count;
        }
        System.out.println(ans);   
    }
}