import java.util.*;
public class Main {
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int max = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    }
    System.out.println(max);
  }
  
  private static int getACGTLen(String s, int from, int to) {
    int length = 0;
    for (int i = from; i <= to; i++) {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    }
    return length;
  }
  
  private static boolean ACGT(char c) {
    return c == 'A' || c == 'C' || c == 'G' || c == 'T';
  }
} 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 max = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    }
    System.out.println(max);
  }
  
  private static int getACGTLen(String s, int from, int to) {
    int length = 0;
    for (int i = from; i <= to; i++) {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    }
    return length;
  }
  
  private static boolean ACGT(char c) {
    return c == 'A' || c == 'C' || c == 'G' || c == 'T';
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int max = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int max = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    }
    System.out.println(max);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int max = 0; max 0 for (int i = 0; i < S.length(); i++) {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    } {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    } for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      } int j = i; int j = i; j i j < S.length() j S.length() S.length S j++ j++ j {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      } {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      } int length = getACGTLen(S, i, j); length getACGTLen(S, i, j) getACGTLen S i j if (max < length) {
          max = length;
        } max < length max length {
          max = length;
        } max = length max length System.out.println(max) System.out.println System.out System System.out max String[] args args private static int getACGTLen(String s, int from, int to) {
    int length = 0;
    for (int i = from; i <= to; i++) {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    }
    return length;
  } getACGTLen {
    int length = 0;
    for (int i = from; i <= to; i++) {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    }
    return length;
  } int length = 0; length 0 for (int i = from; i <= to; i++) {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    } int i = from; int i = from; i from i <= to i to i++ i++ i {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    } {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    } if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      } ACGT(s.charAt(i)) ACGT s.charAt(i) s.charAt s i {
        length++;
      } length++ length {
        return 0;
      } return 0; 0 return length; length String s s int from from int to to private static boolean ACGT(char c) {
    return c == 'A' || c == 'C' || c == 'G' || c == 'T';
  } ACGT {
    return c == 'A' || c == 'C' || c == 'G' || c == 'T';
  } return c == 'A' || c == 'C' || c == 'G' || c == 'T'; 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' char c c public class Main {
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int max = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    }
    System.out.println(max);
  }
  
  private static int getACGTLen(String s, int from, int to) {
    int length = 0;
    for (int i = from; i <= to; i++) {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    }
    return length;
  }
  
  private static boolean ACGT(char c) {
    return c == 'A' || c == 'C' || c == 'G' || c == 'T';
  }
} public class Main {
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int max = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    }
    System.out.println(max);
  }
  
  private static int getACGTLen(String s, int from, int to) {
    int length = 0;
    for (int i = from; i <= to; i++) {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    }
    return length;
  }
  
  private static boolean ACGT(char c) {
    return c == 'A' || c == 'C' || c == 'G' || c == 'T';
  }
} Main
import java.util.*;
public class Main {
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    int max = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i; j < S.length(); j++) {
        int length = getACGTLen(S, i, j);
        if (max < length) {
          max = length;
        }
      }
    }
    System.out.println(max);
  }
  
  private static int getACGTLen(String s, int from, int to) {
    int length = 0;
    for (int i = from; i <= to; i++) {
      if (ACGT(s.charAt(i))) {
        length++;
      } else {
        return 0;
      }
    }
    return length;
  }
  
  private static boolean ACGT(char c) {
    return c == 'A' || c == 'C' || c == 'G' || c == 'T';
  }
}