import java.util.Scanner;

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

    while (in.hasNext()) {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

      System.out.println(maxCount);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

      System.out.println(maxCount);
    }
  }
} Main public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

      System.out.println(maxCount);
    }
  } main {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

      System.out.println(maxCount);
    }
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) while (in.hasNext()) {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

      System.out.println(maxCount);
    } in.hasNext() in.hasNext in {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

      System.out.println(maxCount);
    } String S = in.next(); S in.next() in.next in int count = 0; count 0 int maxCount = 0; maxCount 0 for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S ++i ++i i {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      } {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      } if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        } S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C' S.charAt(i) == 'G' S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C' S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' S.charAt(i) == 'T' S.charAt(i) S.charAt S i 'T' S.charAt(i) == 'G' S.charAt(i) S.charAt S i 'G' S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
          ++count;
          maxCount = Math.max(maxCount, count);
        } ++count count maxCount = Math.max(maxCount, count) maxCount Math.max(maxCount, count) Math.max Math maxCount count {
          count = 0;
        } count = 0 count 0 System.out.println(maxCount) System.out.println System.out System System.out maxCount String[] args args public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

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

    while (in.hasNext()) {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

      System.out.println(maxCount);
    }
  }
} Main
import java.util.Scanner;

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

    while (in.hasNext()) {
      String S = in.next();
    
      int count = 0;
      int maxCount = 0;
      for (int i = 0; i < S.length(); ++i) {
        if (S.charAt(i) == 'A' || S.charAt(i) == 'T' || S.charAt(i) == 'G' || S.charAt(i) == 'C') {
          ++count;
          maxCount = Math.max(maxCount, count);
        } else {
          count = 0;
        }
      }

      System.out.println(maxCount);
    }
  }
}