import java.util.Scanner;

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

    char[] S = scanner.next().toCharArray();
    int max = 0;
    for (int i = 0; i < S.length; i++) for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i);
    System.out.println(max);
  }

  private static boolean isACGT(char[] S, int left, int right) {
    for (int i = left; i < right; i++) {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    }
    return true;
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    char[] S = scanner.next().toCharArray();
    int max = 0;
    for (int i = 0; i < S.length; i++) for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i);
    System.out.println(max);
  }

  private static boolean isACGT(char[] S, int left, int right) {
    for (int i = left; i < right; i++) {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    }
    return true;
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    char[] S = scanner.next().toCharArray();
    int max = 0;
    for (int i = 0; i < S.length; i++) for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i);
    System.out.println(max);
  } main {
    Scanner scanner = new Scanner(System.in);

    char[] S = scanner.next().toCharArray();
    int max = 0;
    for (int i = 0; i < S.length; i++) for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i);
    System.out.println(max);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] S = scanner.next().toCharArray(); S scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner int max = 0; max 0 for (int i = 0; i < S.length; i++) for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i); int i = 0; int i = 0; i 0 i < S.length i S.length S S.length i++ i++ i for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i); for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i); int j = i + 1; int j = i + 1; j i + 1 i 1 j <= S.length j S.length S S.length j++ j++ j if (isACGT(S, i, j)) max = Math.max(max, j - i); if (isACGT(S, i, j)) max = Math.max(max, j - i); isACGT(S, i, j) isACGT S i j max = Math.max(max, j - i) max Math.max(max, j - i) Math.max Math max j - i j i System.out.println(max) System.out.println System.out System System.out max String[] args args private static boolean isACGT(char[] S, int left, int right) {
    for (int i = left; i < right; i++) {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    }
    return true;
  } isACGT {
    for (int i = left; i < right; i++) {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    }
    return true;
  } for (int i = left; i < right; i++) {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    } int i = left; int i = left; i left i < right i right i++ i++ i {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    } {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    } char ch = S[i]; ch S[i] S i switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      } ch case 'A': 'A' case 'A': case 'C': 'C' case 'C': case 'G': 'G' case 'G': case 'T': 'T' case 'T': continue; default: default: return false; false return true; true char[] S S int left left int right right public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    char[] S = scanner.next().toCharArray();
    int max = 0;
    for (int i = 0; i < S.length; i++) for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i);
    System.out.println(max);
  }

  private static boolean isACGT(char[] S, int left, int right) {
    for (int i = left; i < right; i++) {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    }
    return true;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    char[] S = scanner.next().toCharArray();
    int max = 0;
    for (int i = 0; i < S.length; i++) for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i);
    System.out.println(max);
  }

  private static boolean isACGT(char[] S, int left, int right) {
    for (int i = left; i < right; i++) {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    }
    return true;
  }
} Main
import java.util.Scanner;

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

    char[] S = scanner.next().toCharArray();
    int max = 0;
    for (int i = 0; i < S.length; i++) for (int j = i + 1; j <= S.length; j++) if (isACGT(S, i, j)) max = Math.max(max, j - i);
    System.out.println(max);
  }

  private static boolean isACGT(char[] S, int left, int right) {
    for (int i = left; i < right; i++) {
      char ch = S[i];
      switch (ch) {
        case 'A':
        case 'C':
        case 'G':
        case 'T':
          continue;
        default:
          return false;
      }
    }
    return true;
  }
}
