import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int n = S.length();
    int tmp=0;
    String part[] = new String[n*(n+1)/2];
    for(int i=0;i<n;i++){
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    }
    int answer = 0;
    for(int i=0;i<part.length;i++){
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    }
    System.out.println(answer);
    
  }
  
  public static boolean isATGC(String s){
    for(int i=0;i<s.length();i++){
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    }
    return true;
  }
  

  
} 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 n = S.length();
    int tmp=0;
    String part[] = new String[n*(n+1)/2];
    for(int i=0;i<n;i++){
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    }
    int answer = 0;
    for(int i=0;i<part.length;i++){
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    }
    System.out.println(answer);
    
  }
  
  public static boolean isATGC(String s){
    for(int i=0;i<s.length();i++){
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    }
    return true;
  }
  

  
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int n = S.length();
    int tmp=0;
    String part[] = new String[n*(n+1)/2];
    for(int i=0;i<n;i++){
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    }
    int answer = 0;
    for(int i=0;i<part.length;i++){
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    }
    System.out.println(answer);
    
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int n = S.length();
    int tmp=0;
    String part[] = new String[n*(n+1)/2];
    for(int i=0;i<n;i++){
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    }
    int answer = 0;
    for(int i=0;i<part.length;i++){
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    }
    System.out.println(answer);
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int n = S.length(); n S.length() S.length S int tmp=0; tmp 0 String part[] = new String[n*(n+1)/2]; part new String[n*(n+1)/2] n*(n+1)/2 n*(n+1) n (n+1) n 1 2 for(int i=0;i<n;i++){
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    } {
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    } for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      } int j=i; int j=i; j i j<n j n j++ j++ j {
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      } {
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      } part[tmp]=S.substring(i,j+1) part[tmp] part tmp S.substring(i,j+1) S.substring S i j+1 j 1 tmp=tmp+1 tmp tmp+1 tmp 1 int answer = 0; answer 0 for(int i=0;i<part.length;i++){
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    } int i=0; int i=0; i 0 i<part.length i part.length part part.length i++ i++ i {
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    } {
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    } if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      } isATGC(part[i]) isATGC part[i] part i {
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      } if(answer<part[i].length()){
          answer=part[i].length();
        } answer<part[i].length() answer part[i].length() part[i].length part[i] part i {
          answer=part[i].length();
        } answer=part[i].length() answer part[i].length() part[i].length part[i] part i System.out.println(answer) System.out.println System.out System System.out answer String[] args args public static boolean isATGC(String s){
    for(int i=0;i<s.length();i++){
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    }
    return true;
  } isATGC {
    for(int i=0;i<s.length();i++){
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    }
    return true;
  } for(int i=0;i<s.length();i++){
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    } {
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    } if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      } s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C") s.substring(i,i+1).equals("G") s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C") s.substring(i,i+1).equals("A") s.substring(i,i+1).equals s.substring(i,i+1) s.substring s i i+1 i 1 "A" s.substring(i,i+1).equals("T") s.substring(i,i+1).equals s.substring(i,i+1) s.substring s i i+1 i 1 "T" s.substring(i,i+1).equals("G") s.substring(i,i+1).equals s.substring(i,i+1) s.substring s i i+1 i 1 "G" s.substring(i,i+1).equals("C") s.substring(i,i+1).equals s.substring(i,i+1) s.substring s i i+1 i 1 "C" {
        continue;
      } continue; {
        return false;
      } return false; false return true; true String s s public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int n = S.length();
    int tmp=0;
    String part[] = new String[n*(n+1)/2];
    for(int i=0;i<n;i++){
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    }
    int answer = 0;
    for(int i=0;i<part.length;i++){
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    }
    System.out.println(answer);
    
  }
  
  public static boolean isATGC(String s){
    for(int i=0;i<s.length();i++){
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    }
    return true;
  }
  

  
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int n = S.length();
    int tmp=0;
    String part[] = new String[n*(n+1)/2];
    for(int i=0;i<n;i++){
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    }
    int answer = 0;
    for(int i=0;i<part.length;i++){
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    }
    System.out.println(answer);
    
  }
  
  public static boolean isATGC(String s){
    for(int i=0;i<s.length();i++){
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    }
    return true;
  }
  

  
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int n = S.length();
    int tmp=0;
    String part[] = new String[n*(n+1)/2];
    for(int i=0;i<n;i++){
      for(int j=i;j<n;j++){
        part[tmp]=S.substring(i,j+1);
        tmp=tmp+1;
      }
    }
    int answer = 0;
    for(int i=0;i<part.length;i++){
      if(isATGC(part[i])){
        if(answer<part[i].length()){
          answer=part[i].length();
        }
      }
    }
    System.out.println(answer);
    
  }
  
  public static boolean isATGC(String s){
    for(int i=0;i<s.length();i++){
      if(s.substring(i,i+1).equals("A")||s.substring(i,i+1).equals("T")||s.substring(i,i+1).equals("G")||s.substring(i,i+1).equals("C")){
        continue;
      }else{
        return false;
      }
    }
    return true;
  }
  

  
}