import java.util.*;

public class Main{ 
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    char[] list = S.toCharArray();
    
    int count = 0;
    int countMax = 0;
    
    for(int i = 0; i < list.length; ++i){
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    }
    

      
     System.out.println(countMax);
  }
}  import java.util.*; util.* java public class Main{ 
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    char[] list = S.toCharArray();
    
    int count = 0;
    int countMax = 0;
    
    for(int i = 0; i < list.length; ++i){
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    }
    

      
     System.out.println(countMax);
  }
} Main public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    char[] list = S.toCharArray();
    
    int count = 0;
    int countMax = 0;
    
    for(int i = 0; i < list.length; ++i){
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    }
    

      
     System.out.println(countMax);
  } main {
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    char[] list = S.toCharArray();
    
    int count = 0;
    int countMax = 0;
    
    for(int i = 0; i < list.length; ++i){
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    }
    

      
     System.out.println(countMax);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char[] list = S.toCharArray(); list S.toCharArray() S.toCharArray S int count = 0; count 0 int countMax = 0; countMax 0 for(int i = 0; i < list.length; ++i){
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    } int i = 0; int i = 0; i 0 i < list.length i list.length list list.length ++i ++i i {
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    } {
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    } if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      } list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T' list[i] == 'G' list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T' list[i] == 'A' list[i] list i 'A' list[i] == 'C' list[i] list i 'C' list[i] == 'G' list[i] list i 'G' list[i] == 'T' list[i] list i 'T' {
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      } count++ count for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        } int j = i+1; int j = i+1; j i+1 i 1 j < list.length j list.length list list.length ++j ++j j {
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        } {
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        } if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          } list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T' list[j] == 'G' list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T' list[j] == 'A' list[j] list j 'A' list[j] == 'C' list[j] list j 'C' list[j] == 'G' list[j] list j 'G' list[j] == 'T' list[j] list j 'T' {
            count++;
          } count++ count {
             break; 
          } break; if(countMax < count){
         countMax = count;
      } countMax < count countMax count {
         countMax = count;
      } countMax = count countMax count count = 0 count 0 System.out.println(countMax) System.out.println System.out System System.out countMax String[] args args public class Main{ 
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    char[] list = S.toCharArray();
    
    int count = 0;
    int countMax = 0;
    
    for(int i = 0; i < list.length; ++i){
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    }
    

      
     System.out.println(countMax);
  }
} public class Main{ 
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    char[] list = S.toCharArray();
    
    int count = 0;
    int countMax = 0;
    
    for(int i = 0; i < list.length; ++i){
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    }
    

      
     System.out.println(countMax);
  }
} Main
import java.util.*;

public class Main{ 
  
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    char[] list = S.toCharArray();
    
    int count = 0;
    int countMax = 0;
    
    for(int i = 0; i < list.length; ++i){
      if(list[i] == 'A' || list[i] == 'C' || list[i] == 'G' || list[i] == 'T'){
        count++;
        for(int j = i+1; j < list.length; ++j){
          if(list[j] == 'A' || list[j] == 'C' || list[j] == 'G' || list[j] == 'T'){
            count++;
          }
          else{
             break; 
          }
        }
      }
      if(countMax < count){
         countMax = count;
      }     
      count = 0;
    }
    

      
     System.out.println(countMax);
  }
} 
