import java.util.Scanner;

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

  private static int solve(String s) {
    int ret = 0;
    for(int i=0; i<s.length(); i++) {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    }
    return ret;
  }
  
  private static int solve2(String s) {
    for(char c: s.toCharArray()) {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    }
    return s.length();
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s =sc.next();
    System.out.println(solve(s));
  }

  private static int solve(String s) {
    int ret = 0;
    for(int i=0; i<s.length(); i++) {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    }
    return ret;
  }
  
  private static int solve2(String s) {
    for(char c: s.toCharArray()) {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    }
    return s.length();
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s =sc.next();
    System.out.println(solve(s));
  } main {
    Scanner sc = new Scanner(System.in);
    String s =sc.next();
    System.out.println(solve(s));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s =sc.next(); s sc.next() sc.next sc System.out.println(solve(s)) System.out.println System.out System System.out solve(s) solve s String[] args args private static int solve(String s) {
    int ret = 0;
    for(int i=0; i<s.length(); i++) {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    }
    return ret;
  } solve {
    int ret = 0;
    for(int i=0; i<s.length(); i++) {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    }
    return ret;
  } int ret = 0; ret 0 for(int i=0; i<s.length(); i++) {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    } {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    } for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      } int j=i+1; int j=i+1; j i+1 i 1 j<=s.length() j s.length() s.length s j++ j++ j {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      } {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      } ret = Math.max(ret, solve2(s.substring(i, j))) ret Math.max(ret, solve2(s.substring(i, j))) Math.max Math ret solve2(s.substring(i, j)) solve2 s.substring(i, j) s.substring s i j return ret; ret String s s private static int solve2(String s) {
    for(char c: s.toCharArray()) {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    }
    return s.length();
  } solve2 {
    for(char c: s.toCharArray()) {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    }
    return s.length();
  } for(char c: s.toCharArray()) {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    } char c s.toCharArray() s.toCharArray s {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    } {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    } if(c!='A' && c!='C' && c!='G' && c!='T') return 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' return 0; 0 return s.length(); s.length() s.length s String s s public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s =sc.next();
    System.out.println(solve(s));
  }

  private static int solve(String s) {
    int ret = 0;
    for(int i=0; i<s.length(); i++) {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    }
    return ret;
  }
  
  private static int solve2(String s) {
    for(char c: s.toCharArray()) {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    }
    return s.length();
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s =sc.next();
    System.out.println(solve(s));
  }

  private static int solve(String s) {
    int ret = 0;
    for(int i=0; i<s.length(); i++) {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    }
    return ret;
  }
  
  private static int solve2(String s) {
    for(char c: s.toCharArray()) {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    }
    return s.length();
  }
} Main
import java.util.Scanner;

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

  private static int solve(String s) {
    int ret = 0;
    for(int i=0; i<s.length(); i++) {
      for(int j=i+1; j<=s.length(); j++) {
        ret = Math.max(ret, solve2(s.substring(i, j)));
      }
    }
    return ret;
  }
  
  private static int solve2(String s) {
    for(char c: s.toCharArray()) {
      if(c!='A' && c!='C' && c!='G' && c!='T') return 0;
    }
    return s.length();
  }
}
