import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BATCoder solver = new BATCoder();
        solver.solve(1, in, out);
        out.close();
    }

    static class BATCoder {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();
            int n = str.length();
            int ans = 0;

            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            }
            out.println(ans);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BATCoder solver = new BATCoder();
        solver.solve(1, in, out);
        out.close();
    }

    static class BATCoder {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();
            int n = str.length();
            int ans = 0;

            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            }
            out.println(ans);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BATCoder solver = new BATCoder();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BATCoder solver = new BATCoder();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) BATCoder solver = new BATCoder(); solver new BATCoder() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BATCoder {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();
            int n = str.length();
            int ans = 0;

            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            }
            out.println(ans);
        }

    } BATCoder public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();
            int n = str.length();
            int ans = 0;

            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            }
            out.println(ans);
        } solve {
            String str = in.next();
            int n = str.length();
            int ans = 0;

            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            }
            out.println(ans);
        } String str = in.next(); str in.next() in.next in int n = str.length(); n str.length() str.length str int ans = 0; ans 0 for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            } {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            } for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                } int j = i + 1; int j = i + 1; j i + 1 i 1 j <= n j n j++ j++ j {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                } {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                } String sliced = str.substring(i, j); sliced str.substring(i, j) str.substring str i j boolean flg = true; flg true for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    } int k = 0; int k = 0; k 0 k < sliced.length() k sliced.length() sliced.length sliced k++ k++ k {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    } {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    } char c = sliced.charAt(k); c sliced.charAt(k) sliced.charAt sliced k if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        } c != 'A' && c != 'C' && c != 'G' && c != 'T' c != 'G' c != 'A' && c != 'C' && c != 'G' && c != 'T' c != 'A' c 'A' c != 'C' c 'C' c != 'G' c 'G' c != 'T' c 'T' {
                            flg = false;
                            break;
                        } flg = false flg false break; if (flg) {
                        ans = Math.max(ans, sliced.length());
                    } flg {
                        ans = Math.max(ans, sliced.length());
                    } ans = Math.max(ans, sliced.length()) ans Math.max(ans, sliced.length()) Math.max Math ans sliced.length() sliced.length sliced out.println(ans) out.println out ans int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BATCoder solver = new BATCoder();
        solver.solve(1, in, out);
        out.close();
    }

    static class BATCoder {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();
            int n = str.length();
            int ans = 0;

            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            }
            out.println(ans);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BATCoder solver = new BATCoder();
        solver.solve(1, in, out);
        out.close();
    }

    static class BATCoder {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();
            int n = str.length();
            int ans = 0;

            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            }
            out.println(ans);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BATCoder solver = new BATCoder();
        solver.solve(1, in, out);
        out.close();
    }

    static class BATCoder {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();
            int n = str.length();
            int ans = 0;

            for (int i = 0; i < n; i++) {
                for (int j = i + 1; j <= n; j++) {
                    String sliced = str.substring(i, j);
                    boolean flg = true;
                    for (int k = 0; k < sliced.length(); k++) {
                        char c = sliced.charAt(k);
                        if (c != 'A' && c != 'C' && c != 'G' && c != 'T') {
                            flg = false;
                            break;
                        }
                    }
                    if (flg) {
                        ans = Math.max(ans, sliced.length());
                    }
                }
            }
            out.println(ans);
        }

    }
}

