import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    String s = sc.next();

    int count = 0;
    int max = 0;
    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    }

    os.println(max);
  }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.*; util.* java public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    String s = sc.next();

    int count = 0;
    int max = 0;
    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    }

    os.println(max);
  }
} Main public static void main(String[] args) {
    solve(System.in, System.out);
  } main {
    solve(System.in, System.out);
  } solve(System.in, System.out) solve System.in System System.in System.out System System.out String[] args args static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    String s = sc.next();

    int count = 0;
    int max = 0;
    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    }

    os.println(max);
  } solve {
    Scanner sc = new Scanner(is);

    /* read */
    String s = sc.next();

    int count = 0;
    int max = 0;
    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    }

    os.println(max);
  } Scanner sc = new Scanner(is); sc new Scanner(is) String s = sc.next(); s sc.next() sc.next sc int count = 0; count 0 int max = 0; max 0 for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    } {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    } char c = s.charAt(i); c s.charAt(i) s.charAt s i if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      } c == 'A' || c == 'T' || c == 'G' || c == 'C' c == 'G' c == 'A' || c == 'T' || c == 'G' || c == 'C' c == 'A' c 'A' c == 'T' c 'T' c == 'G' c 'G' c == 'C' c 'C' {
        count++;
        max = Math.max(count, max);
      } count++ count max = Math.max(count, max) max Math.max(count, max) Math.max Math count max {
        count = 0;
      } count = 0 count 0 os.println(max) os.println os max InputStream is is PrintStream os os public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    String s = sc.next();

    int count = 0;
    int max = 0;
    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    }

    os.println(max);
  }
} public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    String s = sc.next();

    int count = 0;
    int max = 0;
    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    }

    os.println(max);
  }
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {

  public static void main(String[] args) {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    Scanner sc = new Scanner(is);

    /* read */
    String s = sc.next();

    int count = 0;
    int max = 0;
    for (int i = 0; i < s.length(); i++) {
      char c = s.charAt(i);
      if (c == 'A' || c == 'T' || c == 'G' || c == 'C') {
        count++;
        max = Math.max(count, max);
      } else {
        count = 0;
      }
    }

    os.println(max);
  }
}