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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author ky112233
 */
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();
            Set<Character> set = new HashSet<>();
            set.add('A');
            set.add('C');
            set.add('G');
            set.add('T');
            int j = 0;
            int mx = 0;
            for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            }
            out.println(mx);
        }

    }
}
 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.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set 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();
            Set<Character> set = new HashSet<>();
            set.add('A');
            set.add('C');
            set.add('G');
            set.add('T');
            int j = 0;
            int mx = 0;
            for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            }
            out.println(mx);
        }

    }
} 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();
            Set<Character> set = new HashSet<>();
            set.add('A');
            set.add('C');
            set.add('G');
            set.add('T');
            int j = 0;
            int mx = 0;
            for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            }
            out.println(mx);
        }

    } BATCoder public void solve(int testNumber, Scanner in, PrintWriter out) {
            String str = in.next();
            Set<Character> set = new HashSet<>();
            set.add('A');
            set.add('C');
            set.add('G');
            set.add('T');
            int j = 0;
            int mx = 0;
            for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            }
            out.println(mx);
        } solve {
            String str = in.next();
            Set<Character> set = new HashSet<>();
            set.add('A');
            set.add('C');
            set.add('G');
            set.add('T');
            int j = 0;
            int mx = 0;
            for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            }
            out.println(mx);
        } String str = in.next(); str in.next() in.next in Set<Character> set = new HashSet<>(); set new HashSet<>() set.add('A') set.add set 'A' set.add('C') set.add set 'C' set.add('G') set.add set 'G' set.add('T') set.add set 'T' int j = 0; j 0 int mx = 0; mx 0 for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            } {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            } if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                } set.contains(str.charAt(i)) set.contains set str.charAt(i) str.charAt str i {
                    mx = Math.max(mx, i - j + 1);
                } mx = Math.max(mx, i - j + 1) mx Math.max(mx, i - j + 1) Math.max Math mx i - j + 1 i - j i j 1 {
                    j = i + 1;
                } j = i + 1 j i + 1 i 1 out.println(mx) out.println out mx 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();
            Set<Character> set = new HashSet<>();
            set.add('A');
            set.add('C');
            set.add('G');
            set.add('T');
            int j = 0;
            int mx = 0;
            for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            }
            out.println(mx);
        }

    }
} 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();
            Set<Character> set = new HashSet<>();
            set.add('A');
            set.add('C');
            set.add('G');
            set.add('T');
            int j = 0;
            int mx = 0;
            for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            }
            out.println(mx);
        }

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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author ky112233
 */
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();
            Set<Character> set = new HashSet<>();
            set.add('A');
            set.add('C');
            set.add('G');
            set.add('T');
            int j = 0;
            int mx = 0;
            for (int i = 0; i < str.length(); i++) {
                if (set.contains(str.charAt(i))) {
                    mx = Math.max(mx, i - j + 1);
                } else {
                    j = i + 1;
                }
            }
            out.println(mx);
        }

    }
}

