import java.io.*;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    char[] t = br.readLine().toCharArray();
    
    int result = 0;
    int temp = 0;
    for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    }
    System.out.println(result);
  }
} import java.io.*; io.* java public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    char[] t = br.readLine().toCharArray();
    
    int result = 0;
    int temp = 0;
    for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    }
    System.out.println(result);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    char[] t = br.readLine().toCharArray();
    
    int result = 0;
    int temp = 0;
    for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    }
    System.out.println(result);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    char[] t = br.readLine().toCharArray();
    
    int result = 0;
    int temp = 0;
    for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    }
    System.out.println(result);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char[] t = br.readLine().toCharArray(); t br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br int result = 0; result 0 int temp = 0; temp 0 for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    } char c t {
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    } {
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    } if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      } c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'G' c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'A' c 'A' c == 'C' c 'C' c == 'G' c 'G' c == 'T' c 'T' {
        temp++;
        if (result < temp) result = temp;
      } temp++ temp if (result < temp) result = temp; result < temp result temp result = temp result temp {
        temp = 0;
      } temp = 0 temp 0 System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    char[] t = br.readLine().toCharArray();
    
    int result = 0;
    int temp = 0;
    for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    }
    System.out.println(result);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    char[] t = br.readLine().toCharArray();
    
    int result = 0;
    int temp = 0;
    for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    }
    System.out.println(result);
  }
} Main
import java.io.*;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    char[] t = br.readLine().toCharArray();
    
    int result = 0;
    int temp = 0;
    for (char c : t){
      if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
        temp++;
        if (result < temp) result = temp;
      } else {
        temp = 0;
      }
    }
    System.out.println(result);
  }
}