import java.util.*;

public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();

    sc.close();

    String[] S = s.split("");

    String result = "";

    int max = 0;

    for (int i = 0; i < S.length; i++) {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    }

    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();

    sc.close();

    String[] S = s.split("");

    String result = "";

    int max = 0;

    for (int i = 0; i < S.length; i++) {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    }

    System.out.println(max);

  }

} Main public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();

    sc.close();

    String[] S = s.split("");

    String result = "";

    int max = 0;

    for (int i = 0; i < S.length; i++) {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    }

    System.out.println(max);

  } main {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();

    sc.close();

    String[] S = s.split("");

    String result = "";

    int max = 0;

    for (int i = 0; i < S.length; i++) {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    }

    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 sc.close() sc.close sc String[] S = s.split(""); S s.split("") s.split s "" String result = ""; result "" int max = 0; max 0 for (int i = 0; i < S.length; i++) {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    } int i = 0; int i = 0; i 0 i < S.length i S.length S S.length i++ i++ i {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    } {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    } if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      } S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T") S[i].equals("G") S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T") S[i].equals("A") S[i].equals S[i] S i "A" S[i].equals("C") S[i].equals S[i] S i "C" S[i].equals("G") S[i].equals S[i] S i "G" S[i].equals("T") S[i].equals S[i] S i "T" {
        result += S[i];
        max = Math.max(max, result.length());
      } result += S[i] result S[i] S i max = Math.max(max, result.length()) max Math.max(max, result.length()) Math.max Math max result.length() result.length result {
        result = "";
      } result = "" result "" 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();

    sc.close();

    String[] S = s.split("");

    String result = "";

    int max = 0;

    for (int i = 0; i < S.length; i++) {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    }

    System.out.println(max);

  }

} public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();

    sc.close();

    String[] S = s.split("");

    String result = "";

    int max = 0;

    for (int i = 0; i < S.length; i++) {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    }

    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();

    sc.close();

    String[] S = s.split("");

    String result = "";

    int max = 0;

    for (int i = 0; i < S.length; i++) {
      if (S[i].equals("A") || S[i].equals("C") || S[i].equals("G") || S[i].equals("T")) {
        result += S[i];
        max = Math.max(max, result.length());
      } else {
        result = "";
      }
    }

    System.out.println(max);

  }

}