import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
 
public class Main {
 
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String B = sc.nextLine();
    int max = 0; //the longest sequence of ACGT.
    int count = 0; //the longest current sequence of ACGT.
    for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    }
    max = Math.max(max, count);
    System.out.println(max);
  }
} import java.io.IOException; IOException java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
 
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String B = sc.nextLine();
    int max = 0; //the longest sequence of ACGT.
    int count = 0; //the longest current sequence of ACGT.
    for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    }
    max = Math.max(max, count);
    System.out.println(max);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String B = sc.nextLine();
    int max = 0; //the longest sequence of ACGT.
    int count = 0; //the longest current sequence of ACGT.
    for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    }
    max = Math.max(max, count);
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    String B = sc.nextLine();
    int max = 0; //the longest sequence of ACGT.
    int count = 0; //the longest current sequence of ACGT.
    for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    }
    max = Math.max(max, count);
    System.out.println(max);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String B = sc.nextLine(); B sc.nextLine() sc.nextLine sc int max = 0; max 0 int count = 0; count 0 for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    } int i=0; int i=0; i 0 i<B.length() i B.length() B.length B i++ i++ i {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    } {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    } if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      } B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T' B.charAt(i) == 'G' B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T' B.charAt(i) == 'A' B.charAt(i) B.charAt B i 'A' B.charAt(i) == 'C' B.charAt(i) B.charAt B i 'C' B.charAt(i) == 'G' B.charAt(i) B.charAt B i 'G' B.charAt(i) == 'T' B.charAt(i) B.charAt B i 'T' {
        count++;
      } count++ count {
        
        max = Math.max(max, count);
        count = 0;
      } max = Math.max(max, count) max Math.max(max, count) Math.max Math max count count = 0 count 0 max = Math.max(max, count) max Math.max(max, count) Math.max Math max count 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 B = sc.nextLine();
    int max = 0; //the longest sequence of ACGT.
    int count = 0; //the longest current sequence of ACGT.
    for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    }
    max = Math.max(max, count);
    System.out.println(max);
  }
} public class Main {
 
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String B = sc.nextLine();
    int max = 0; //the longest sequence of ACGT.
    int count = 0; //the longest current sequence of ACGT.
    for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    }
    max = Math.max(max, count);
    System.out.println(max);
  }
} Main
import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
 
public class Main {
 
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String B = sc.nextLine();
    int max = 0; //the longest sequence of ACGT.
    int count = 0; //the longest current sequence of ACGT.
    for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    }
    max = Math.max(max, count);
    System.out.println(max);
  }
}
