import java.util.Arrays;
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char c ;
    int counter = 0;
    int ans =0;
    for(int i=0;i<s.length();i++) {
      c=s.charAt(i);
      if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 0;
      }
    }
    System.out.println(ans);

    }
  } import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char c ;
    int counter = 0;
    int ans =0;
    for(int i=0;i<s.length();i++) {
      c=s.charAt(i);
      if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 0;
      }
    }
    System.out.println(ans);

    }
  } Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char c ;
    int counter = 0;
    int ans =0;
    for(int i=0;i<s.length();i++) {
      c=s.charAt(i);
      if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 0;
      }
    }
    System.out.println(ans);

    } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char c ;
    int counter = 0;
    int ans =0;
    for(int i=0;i<s.length();i++) {
      c=s.charAt(i);
      if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 0;
      }
    }
    System.out.println(ans);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char c ; c int counter = 0; counter 0 int ans =0; ans 0 for(int i=0;i<s.length();i++) {
      c=s.charAt(i);
      if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 0;
      }
    } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
      c=s.charAt(i);
      if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 0;
      }
    } {
      c=s.charAt(i);
      if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 0;
      }
    } c=s.charAt(i) c s.charAt(i) s.charAt s i if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 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' {
        counter++;
        ans = Math.max(ans, counter);
      } counter++ counter ans = Math.max(ans, counter) ans Math.max(ans, counter) Math.max Math ans counter {
        ans = Math.max(ans, counter);
        counter = 0;
      } ans = Math.max(ans, counter) ans Math.max(ans, counter) Math.max Math ans counter counter = 0 counter 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Arrays;
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char c ;
    int counter = 0;
    int ans =0;
    for(int i=0;i<s.length();i++) {
      c=s.charAt(i);
      if(c=='A' || c=='C' || c=='G' || c=='T' ) {
        counter++;
        ans = Math.max(ans, counter);
      } else {
        ans = Math.max(ans, counter);
        counter = 0;
      }
    }
    System.out.println(ans);

    }
  }
