import java.util.*;

public class Main {

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

        String s = sc.next();
        int max = 0;
        int currentLength = 0;

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        }

        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {

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

        String s = sc.next();
        int max = 0;
        int currentLength = 0;

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        }

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

        String s = sc.next();
        int max = 0;
        int currentLength = 0;

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        }

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

        String s = sc.next();
        int max = 0;
        int currentLength = 0;

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        }

        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int max = 0; max 0 int currentLength = 0; currentLength 0 for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        } {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            } c case 'A': 'A' case 'A': case 'C': 'C' case 'C': case 'G': 'G' case 'G': case 'T': 'T' case 'T': currentLength++ currentLength break; default: default: currentLength = 0 currentLength 0 break; if (max < currentLength) {
                max = currentLength;
            } max < currentLength max currentLength {
                max = currentLength;
            } max = currentLength max currentLength 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 sc = new Scanner(System.in);

        String s = sc.next();
        int max = 0;
        int currentLength = 0;

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        }

        System.out.println(max);
    }
} public class Main {

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

        String s = sc.next();
        int max = 0;
        int currentLength = 0;

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        }

        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {

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

        String s = sc.next();
        int max = 0;
        int currentLength = 0;

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
                case 'A':
                case 'C':
                case 'G':
                case 'T':
                    currentLength++;
                    break;
                default:
                    currentLength = 0;
                    break;
            }

            if (max < currentLength) {
                max = currentLength;
            }
        }

        System.out.println(max);
    }
}
