import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int maxLen = 0;
      int leftIdx = 0;
      Set<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');
      set.add('G');
      set.add('T');
      for(int i = 0; i < s.length(); i++) {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      }
      maxLen = Math.max(maxLen, s.length() - leftIdx);
      System.out.println(maxLen);
  }
} import java.util.*; util.* java public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int maxLen = 0;
      int leftIdx = 0;
      Set<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');
      set.add('G');
      set.add('T');
      for(int i = 0; i < s.length(); i++) {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      }
      maxLen = Math.max(maxLen, s.length() - leftIdx);
      System.out.println(maxLen);
  }
} Main public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int maxLen = 0;
      int leftIdx = 0;
      Set<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');
      set.add('G');
      set.add('T');
      for(int i = 0; i < s.length(); i++) {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      }
      maxLen = Math.max(maxLen, s.length() - leftIdx);
      System.out.println(maxLen);
  } main { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int maxLen = 0;
      int leftIdx = 0;
      Set<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');
      set.add('G');
      set.add('T');
      for(int i = 0; i < s.length(); i++) {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      }
      maxLen = Math.max(maxLen, s.length() - leftIdx);
      System.out.println(maxLen);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int maxLen = 0; maxLen 0 int leftIdx = 0; leftIdx 0 Set<Character> set = new HashSet<>(); set new HashSet<>() set.add('A') set.add set 'A' set.add('C') set.add set 'C' set.add('G') set.add set 'G' set.add('T') set.add set 'T' for(int i = 0; i < s.length(); i++) {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      } {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      } if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        } !set.contains(s.charAt(i)) set.contains(s.charAt(i)) set.contains set s.charAt(i) s.charAt s i {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        } maxLen = Math.max(maxLen, i - leftIdx) maxLen Math.max(maxLen, i - leftIdx) Math.max Math maxLen i - leftIdx i leftIdx leftIdx = i + 1 leftIdx i + 1 i 1 maxLen = Math.max(maxLen, s.length() - leftIdx) maxLen Math.max(maxLen, s.length() - leftIdx) Math.max Math maxLen s.length() - leftIdx s.length() s.length s leftIdx System.out.println(maxLen) System.out.println System.out System System.out maxLen String[] args args public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int maxLen = 0;
      int leftIdx = 0;
      Set<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');
      set.add('G');
      set.add('T');
      for(int i = 0; i < s.length(); i++) {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      }
      maxLen = Math.max(maxLen, s.length() - leftIdx);
      System.out.println(maxLen);
  }
} public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int maxLen = 0;
      int leftIdx = 0;
      Set<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');
      set.add('G');
      set.add('T');
      for(int i = 0; i < s.length(); i++) {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      }
      maxLen = Math.max(maxLen, s.length() - leftIdx);
      System.out.println(maxLen);
  }
} Main
import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int maxLen = 0;
      int leftIdx = 0;
      Set<Character> set = new HashSet<>();
      set.add('A');
      set.add('C');
      set.add('G');
      set.add('T');
      for(int i = 0; i < s.length(); i++) {
        if(!set.contains(s.charAt(i))) {
          maxLen = Math.max(maxLen, i - leftIdx);
          leftIdx = i + 1;
        }
      }
      maxLen = Math.max(maxLen, s.length() - leftIdx);
      System.out.println(maxLen);
  }
}