import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    String S = in.next();

    int ans = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    }
    
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    String S = in.next();

    int ans = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    }
    
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    String S = in.next();

    int ans = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    }
    
    System.out.println(ans);
  } main {
    Scanner in = new Scanner(System.in);
    String S = in.next();

    int ans = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    }
    
    System.out.println(ans);
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) String S = in.next(); S in.next() in.next in int ans = 0; ans 0 for (int i = 0; i < S.length(); i++) {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.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 + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    } {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    } for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      } 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 {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      } {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      } String s = S.substring(i, j); s S.substring(i, j) S.substring S i j boolean match = true; match true for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        } int k = 0; int k = 0; k 0 k < s.length() k s.length() s.length s k++ k++ k {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        } {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        } char c = s.charAt(k); c s.charAt(k) s.charAt s k if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          } !(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' {
            match = false;
          } match = false match false if (match) {
          ans = Math.max(ans, s.length());
        } match {
          ans = Math.max(ans, s.length());
        } ans = Math.max(ans, s.length()) ans Math.max(ans, s.length()) Math.max Math ans s.length() s.length s System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    String S = in.next();

    int ans = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    }
    
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    String S = in.next();

    int ans = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    }
    
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    String S = in.next();

    int ans = 0;
    for (int i = 0; i < S.length(); i++) {
      for (int j = i + 1; j <= S.length(); j++) {
        String s = S.substring(i, j);
        boolean match = true;
        for (int k = 0; k < s.length(); k++) {
          char c = s.charAt(k);
          if (!(c == 'A' || c == 'C' || c == 'G' || c == 'T')) {
            match = false;
          }
        }
        if (match) {
          ans = Math.max(ans, s.length());
        }
      }
    }
    
    System.out.println(ans);
  }
}