import java.util.Scanner;

public class Main {
  public static void main(String[] args) throws Exception {
    Scanner scanner = new Scanner(System.in);
    String a = scanner.next();
    int n = a.length();
    char[] b = a.toCharArray();
    scanner.close();

    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    }
    System.out.println(ans);
  }

  private static int solve(char[] a, int i, int j) {
    for (int k = i; k <= j; k++) {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    }
    return j - i + 1;
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) throws Exception {
    Scanner scanner = new Scanner(System.in);
    String a = scanner.next();
    int n = a.length();
    char[] b = a.toCharArray();
    scanner.close();

    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    }
    System.out.println(ans);
  }

  private static int solve(char[] a, int i, int j) {
    for (int k = i; k <= j; k++) {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    }
    return j - i + 1;
  }
} Main public static void main(String[] args) throws Exception {
    Scanner scanner = new Scanner(System.in);
    String a = scanner.next();
    int n = a.length();
    char[] b = a.toCharArray();
    scanner.close();

    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    }
    System.out.println(ans);
  } main {
    Scanner scanner = new Scanner(System.in);
    String a = scanner.next();
    int n = a.length();
    char[] b = a.toCharArray();
    scanner.close();

    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    }
    System.out.println(ans);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String a = scanner.next(); a scanner.next() scanner.next scanner int n = a.length(); n a.length() a.length a char[] b = a.toCharArray(); b a.toCharArray() a.toCharArray a scanner.close() scanner.close scanner int ans = 0; ans 0 for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    } {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    } for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      } int j = i; int j = i; j i j < n j n j++ j++ j {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      } {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      } int k = solve(b,i,j); k solve(b,i,j) solve b i j if (ans < k) ans = k; ans < k ans k ans = k ans k System.out.println(ans) System.out.println System.out System System.out ans String[] args args private static int solve(char[] a, int i, int j) {
    for (int k = i; k <= j; k++) {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    }
    return j - i + 1;
  } solve {
    for (int k = i; k <= j; k++) {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    }
    return j - i + 1;
  } for (int k = i; k <= j; k++) {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    } int k = i; int k = i; k i k <= j k j k++ k++ k {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    } {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    } if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue; a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T' a[k] == 'C' a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T' a[k] == 'A' a[k] a k 'A' a[k] == 'G' a[k] a k 'G' a[k] == 'C' a[k] a k 'C' a[k] == 'T' a[k] a k 'T' continue; return 0; 0 return j - i + 1; j - i + 1 j - i j i 1 char[] a a int i i int j j public class Main {
  public static void main(String[] args) throws Exception {
    Scanner scanner = new Scanner(System.in);
    String a = scanner.next();
    int n = a.length();
    char[] b = a.toCharArray();
    scanner.close();

    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    }
    System.out.println(ans);
  }

  private static int solve(char[] a, int i, int j) {
    for (int k = i; k <= j; k++) {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    }
    return j - i + 1;
  }
} public class Main {
  public static void main(String[] args) throws Exception {
    Scanner scanner = new Scanner(System.in);
    String a = scanner.next();
    int n = a.length();
    char[] b = a.toCharArray();
    scanner.close();

    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    }
    System.out.println(ans);
  }

  private static int solve(char[] a, int i, int j) {
    for (int k = i; k <= j; k++) {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    }
    return j - i + 1;
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) throws Exception {
    Scanner scanner = new Scanner(System.in);
    String a = scanner.next();
    int n = a.length();
    char[] b = a.toCharArray();
    scanner.close();

    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i; j < n; j++) {
        int k = solve(b,i,j);
        if (ans < k) ans = k;
      }
    }
    System.out.println(ans);
  }

  private static int solve(char[] a, int i, int j) {
    for (int k = i; k <= j; k++) {
      if (a[k] == 'A' || a[k] == 'G' || a[k] == 'C' || a[k] == 'T') continue;
      return 0;
    }
    return j - i + 1;
  }
}