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

      System.out.println(max);
    
  }
} 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 count = 0;
    int max = 0;
    
    for(int i = 0 ; i < s.length() ; ++i){
      if('A'==(s.charAt(i))||'C'==(s.charAt(i))||
        'G'==(s.charAt(i))||'T'==(s.charAt(i))){
        count +=1;
        for(int j = i+1 ; j < s.length() ; ++j){
          if('A'==(s.charAt(j))||'C'==(s.charAt(j))||
             'G'==(s.charAt(j))||'T'==(s.charAt(j))){
            count +=1;
          }else{
            break;
          }
        }
        if(max<count){
          max = count;
        }
      count = 0;
      }
     
    }

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

      System.out.println(max);
    
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int count = 0;
    int max = 0;
    
    for(int i = 0 ; i < s.length() ; ++i){
      if('A'==(s.charAt(i))||'C'==(s.charAt(i))||
        'G'==(s.charAt(i))||'T'==(s.charAt(i))){
        count +=1;
        for(int j = i+1 ; j < s.length() ; ++j){
          if('A'==(s.charAt(j))||'C'==(s.charAt(j))||
             'G'==(s.charAt(j))||'T'==(s.charAt(j))){
            count +=1;
          }else{
            break;
          }
        }
        if(max<count){
          max = count;
        }
      count = 0;
      }
     
    }

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

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

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

      System.out.println(max);
    
  }
}