import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String[] sArray = s.split("");
    List<String> acgt = Arrays.asList("A", "C", "G", "T");

    int count = 0;
    int maxCount = 0;
    for (int i = 0; i < s.length() ; i++ ) {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    }

    System.out.println(maxCount);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String[] sArray = s.split("");
    List<String> acgt = Arrays.asList("A", "C", "G", "T");

    int count = 0;
    int maxCount = 0;
    for (int i = 0; i < s.length() ; i++ ) {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    }

    System.out.println(maxCount);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String[] sArray = s.split("");
    List<String> acgt = Arrays.asList("A", "C", "G", "T");

    int count = 0;
    int maxCount = 0;
    for (int i = 0; i < s.length() ; i++ ) {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    }

    System.out.println(maxCount);
  } main {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String[] sArray = s.split("");
    List<String> acgt = Arrays.asList("A", "C", "G", "T");

    int count = 0;
    int maxCount = 0;
    for (int i = 0; i < s.length() ; i++ ) {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    }

    System.out.println(maxCount);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String[] sArray = s.split(""); sArray s.split("") s.split s "" List<String> acgt = Arrays.asList("A", "C", "G", "T"); acgt Arrays.asList("A", "C", "G", "T") Arrays.asList Arrays "A" "C" "G" "T" int count = 0; count 0 int maxCount = 0; maxCount 0 for (int i = 0; i < s.length() ; i++ ) {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    } {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    } if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      } acgt.contains(sArray[i]) acgt.contains acgt sArray[i] sArray i {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } count++ count if (count > maxCount) {
          maxCount = count;
        } count > maxCount count maxCount {
          maxCount = count;
        } maxCount = count maxCount count {
        count = 0;
      } count = 0 count 0 System.out.println(maxCount) System.out.println System.out System System.out maxCount String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String[] sArray = s.split("");
    List<String> acgt = Arrays.asList("A", "C", "G", "T");

    int count = 0;
    int maxCount = 0;
    for (int i = 0; i < s.length() ; i++ ) {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    }

    System.out.println(maxCount);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String[] sArray = s.split("");
    List<String> acgt = Arrays.asList("A", "C", "G", "T");

    int count = 0;
    int maxCount = 0;
    for (int i = 0; i < s.length() ; i++ ) {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    }

    System.out.println(maxCount);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    String[] sArray = s.split("");
    List<String> acgt = Arrays.asList("A", "C", "G", "T");

    int count = 0;
    int maxCount = 0;
    for (int i = 0; i < s.length() ; i++ ) {
      if (acgt.contains(sArray[i])) {
        count++;
        if (count > maxCount) {
          maxCount = count;
        }
      } else {
        count = 0;
      }
    }

    System.out.println(maxCount);
  }
}
