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
 *
 * @author teiwa
 */
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);
        TaskB_tmp solver = new TaskB_tmp();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB_tmp {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();

            String substr = new String();
            int maxLen = 0;
            for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            }
            out.println(maxLen);
        }

        private boolean isAGCT(String target) {
            for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            }
            return true;
        }

    }
}
 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);
        TaskB_tmp solver = new TaskB_tmp();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB_tmp {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();

            String substr = new String();
            int maxLen = 0;
            for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            }
            out.println(maxLen);
        }

        private boolean isAGCT(String target) {
            for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            }
            return true;
        }

    }
} 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);
        TaskB_tmp solver = new TaskB_tmp();
        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);
        TaskB_tmp solver = new TaskB_tmp();
        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) TaskB_tmp solver = new TaskB_tmp(); solver new TaskB_tmp() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskB_tmp {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();

            String substr = new String();
            int maxLen = 0;
            for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            }
            out.println(maxLen);
        }

        private boolean isAGCT(String target) {
            for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            }
            return true;
        }

    } TaskB_tmp public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();

            String substr = new String();
            int maxLen = 0;
            for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            }
            out.println(maxLen);
        } solve {
            String str = in.next();

            String substr = new String();
            int maxLen = 0;
            for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            }
            out.println(maxLen);
        } String str = in.next(); str in.next() in.next in String substr = new String(); substr new String() int maxLen = 0; maxLen 0 for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            } int i = 1; int i = 1; i 1 i <= str.length() i str.length() str.length str i++ i++ i {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            } {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            } for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                } int j = 0; int j = 0; j 0 j < str.length() - i + 1 j str.length() - i + 1 str.length() - i str.length() str.length str i 1 j++ j++ j {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                } {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                } substr = str.substring(j, j + i) substr str.substring(j, j + i) str.substring str j j + i j i if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    } isAGCT(substr) && substr.length() > maxLen isAGCT(substr) isAGCT substr substr.length() > maxLen substr.length() substr.length substr maxLen {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    } maxLen = substr.length() maxLen substr.length() substr.length substr out.println(maxLen) out.println out maxLen int testNumber testNumber Scanner in in PrintWriter out out private boolean isAGCT(String target) {
            for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            }
            return true;
        } isAGCT {
            for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            }
            return true;
        } for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            } int i = 0; int i = 0; i 0 i < target.length() i target.length() target.length target i++ i++ i {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            } {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            } if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                } target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T' target.charAt(i) != 'C' target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T' target.charAt(i) != 'A' target.charAt(i) target.charAt target i 'A' target.charAt(i) != 'G' target.charAt(i) target.charAt target i 'G' target.charAt(i) != 'C' target.charAt(i) target.charAt target i 'C' target.charAt(i) != 'T' target.charAt(i) target.charAt target i 'T' {
                    return false;
                } return false; false return true; true String target target 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);
        TaskB_tmp solver = new TaskB_tmp();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB_tmp {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();

            String substr = new String();
            int maxLen = 0;
            for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            }
            out.println(maxLen);
        }

        private boolean isAGCT(String target) {
            for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            }
            return true;
        }

    }
} 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);
        TaskB_tmp solver = new TaskB_tmp();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB_tmp {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();

            String substr = new String();
            int maxLen = 0;
            for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            }
            out.println(maxLen);
        }

        private boolean isAGCT(String target) {
            for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            }
            return true;
        }

    }
} 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
 *
 * @author teiwa
 */
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);
        TaskB_tmp solver = new TaskB_tmp();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB_tmp {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();

            String substr = new String();
            int maxLen = 0;
            for (int i = 1; i <= str.length(); i++) {
                for (int j = 0; j < str.length() - i + 1; j++) {
                    //strからj~ i文字の部分文字列
                    substr = str.substring(j, j + i);
                    if (isAGCT(substr) && substr.length() > maxLen) {
                        //System.out.println(substr);
                        maxLen = substr.length();
                    }
                }
            }
            out.println(maxLen);
        }

        private boolean isAGCT(String target) {
            for (int i = 0; i < target.length(); i++) {
                //System.out.println(target.charAt(i));
                if (target.charAt(i) != 'A' && target.charAt(i) != 'G' && target.charAt(i) != 'C' && target.charAt(i) != 'T') {
                    return false;
                }
            }
            return true;
        }

    }
}

