import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int n = s.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    }
    System.out.println(max);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int n = s.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    }
    System.out.println(max);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int n = s.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    }
    System.out.println(max);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int n = s.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    }
    System.out.println(max);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String s = in.readLine(); s in.readLine() in.readLine in int n = s.length(); n s.length() s.length s int max = 0; max 0 int count = 0; count 0 for(int i=0; i<n; i++) {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    } {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    } String str = s.substring(i,i+1); str s.substring(i,i+1) s.substring s i i+1 i 1 if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      } str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T") str.equals("G") str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T") str.equals("A") str.equals str "A" str.equals("C") str.equals str "C" str.equals("G") str.equals str "G" str.equals("T") str.equals str "T" {
        count++;
        if(max < count){
          max = count;
        } 
      } count++ count if(max < count){
          max = count;
        } max < count max count {
          max = count;
        } max = count max count {
        count = 0;
      } 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) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int n = s.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    }
    System.out.println(max);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int n = s.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    }
    System.out.println(max);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int n = s.length();
    int max = 0;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      String str = s.substring(i,i+1);
      if(str.equals("A") || str.equals("C") || str.equals("G") || str.equals("T")){
        count++;
        if(max < count){
          max = count;
        } 
      } else {
        count = 0;
      }
    }
    System.out.println(max);
  }
}