import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    String str = scan.next();
    int max = 0;

    for (int i = 0; i < str.length();) {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    }

    System.out.println(max);
  }

} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    String str = scan.next();
    int max = 0;

    for (int i = 0; i < str.length();) {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    }

    System.out.println(max);
  }

} Main public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    String str = scan.next();
    int max = 0;

    for (int i = 0; i < str.length();) {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    }

    System.out.println(max);
  } main {

    Scanner scan = new Scanner(System.in);

    String str = scan.next();
    int max = 0;

    for (int i = 0; i < str.length();) {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    }

    System.out.println(max);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.next(); str scan.next() scan.next scan int max = 0; max 0 for (int i = 0; i < str.length();) {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    } {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    } int cnt = 0; cnt 0 for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      } int j = i; int j = i; j i j < str.length() j str.length() str.length str j++ j++ j {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      } {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      } i = j + 1 i j + 1 j 1 if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        } (str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T') (str.charAt(j) == 'G') (str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T') (str.charAt(j) == 'A') str.charAt(j) str.charAt str j 'A' (str.charAt(j) == 'C') str.charAt(j) str.charAt str j 'C' (str.charAt(j) == 'G') str.charAt(j) str.charAt str j 'G' (str.charAt(j) == 'T') str.charAt(j) str.charAt str j 'T' {
          cnt++;
        } cnt++ cnt {
          break;
        } break; max = Math.max(max, cnt) max Math.max(max, cnt) Math.max Math max cnt System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    String str = scan.next();
    int max = 0;

    for (int i = 0; i < str.length();) {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    }

    System.out.println(max);
  }

} public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    String str = scan.next();
    int max = 0;

    for (int i = 0; i < str.length();) {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    }

    System.out.println(max);
  }

} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    String str = scan.next();
    int max = 0;

    for (int i = 0; i < str.length();) {
      int cnt = 0;
      for (int j = i; j < str.length(); j++) {
        i = j + 1;
        if ((str.charAt(j) == 'A') || (str.charAt(j) == 'C') || (str.charAt(j) == 'G') || (str.charAt(j) == 'T')) {
          cnt++;
        } else {
          break;
        }
      }
      max = Math.max(max, cnt);
    }

    System.out.println(max);
  }

}