import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    private static long n;

    // 15:41-
    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        }
    }

    private static boolean b(char c) {
        switch (c) {
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                return true;
            default:
                return false;
        }
    }
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.io.BufferedOutputStream; BufferedOutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

    private static long n;

    // 15:41-
    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        }
    }

    private static boolean b(char c) {
        switch (c) {
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                return true;
            default:
                return false;
        }
    }
} Main private static long n; n // 15:41-
    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        }
    } main {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        }
    } try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        } {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        } BufferedInputStream in = new BufferedInputStream(System.in) BufferedInputStream in = new BufferedInputStream(System.in) new BufferedInputStream(System.in) PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)) PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)) new PrintWriter(new BufferedOutputStream(System.out)) Scanner sc = new Scanner(in); sc new Scanner(in) String s = sc.next(); s sc.next() sc.next sc int i = 0; i 0 int ml = 0; ml 0 while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            } i < s.length() i s.length() s.length s {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            } while (i < s.length() && !b(s.charAt(i))) i++; i < s.length() && !b(s.charAt(i)) i < s.length() i s.length() s.length s !b(s.charAt(i)) b(s.charAt(i)) b s.charAt(i) s.charAt s i i++ i int start = i; start i while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start); i < s.length() && b(s.charAt(i)) i < s.length() i s.length() s.length s b(s.charAt(i)) b s.charAt(i) s.charAt s i ml = Math.max(ml, ++i - start) ml Math.max(ml, ++i - start) Math.max Math ml ++i - start ++i i start out.println(ml) out.println out ml String[] args args private static boolean b(char c) {
        switch (c) {
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                return true;
            default:
                return false;
        }
    } b {
        switch (c) {
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                return true;
            default:
                return false;
        }
    } switch (c) {
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                return true;
            default:
                return false;
        } c case 'A': 'A' case 'A': case 'C': 'C' case 'C': case 'G': 'G' case 'G': case 'T': 'T' case 'T': return true; true default: default: return false; false char c c public class Main {

    private static long n;

    // 15:41-
    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        }
    }

    private static boolean b(char c) {
        switch (c) {
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                return true;
            default:
                return false;
        }
    }
} public class Main {

    private static long n;

    // 15:41-
    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        }
    }

    private static boolean b(char c) {
        switch (c) {
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                return true;
            default:
                return false;
        }
    }
} Main
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    private static long n;

    // 15:41-
    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            String s = sc.next();

            int i = 0;
            int ml = 0;
            while (i < s.length()) {
                while (i < s.length() && !b(s.charAt(i))) i++;
                int start = i;
                while (i < s.length() && b(s.charAt(i))) ml = Math.max(ml, ++i - start);
            }

            out.println(ml);
        }
    }

    private static boolean b(char c) {
        switch (c) {
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                return true;
            default:
                return false;
        }
    }
}
