import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();

        int maxlen = 0;
        int i = 0;
        while (i < N) {
            int len = 0;
            char ch = S.charAt(i);
            while (i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            }
            i++;
        }

        System.out.println(maxlen);

        return;
    }

} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
} Main public static void main(String[] args) {
        new Solver().run();
    } main {
        new Solver().run();
    } new Solver().run() new Solver().run new Solver() String[] args args class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();

        int maxlen = 0;
        int i = 0;
        while (i < N) {
            int len = 0;
            char ch = S.charAt(i);
            while (i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            }
            i++;
        }

        System.out.println(maxlen);

        return;
    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();

        int maxlen = 0;
        int i = 0;
        while (i < N) {
            int len = 0;
            char ch = S.charAt(i);
            while (i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            }
            i++;
        }

        System.out.println(maxlen);

        return;
    } run {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();

        int maxlen = 0;
        int i = 0;
        while (i < N) {
            int len = 0;
            char ch = S.charAt(i);
            while (i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            }
            i++;
        }

        System.out.println(maxlen);

        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int N = S.length(); N S.length() S.length S int maxlen = 0; maxlen 0 int i = 0; i 0 while (i < N) {
            int len = 0;
            char ch = S.charAt(i);
            while (i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            }
            i++;
        } i < N i N {
            int len = 0;
            char ch = S.charAt(i);
            while (i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            }
            i++;
        } int len = 0; len 0 char ch = S.charAt(i); ch S.charAt(i) S.charAt S i while (i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            } i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') i < N i N (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ch == 'G' ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T' ch == 'A' ch 'A' ch == 'C' ch 'C' ch == 'G' ch 'G' ch == 'T' ch 'T' {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            } len++ len maxlen = Math.max(len, maxlen) maxlen Math.max(len, maxlen) Math.max Math len maxlen i++ i if (i < N) ch = S.charAt(i); i < N i N ch = S.charAt(i) ch S.charAt(i) S.charAt S i i++ i System.out.println(maxlen) System.out.println System.out System System.out maxlen return;
import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();

        int maxlen = 0;
        int i = 0;
        while (i < N) {
            int len = 0;
            char ch = S.charAt(i);
            while (i < N && (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
                len++;
                maxlen = Math.max(len, maxlen);

                i++;
                if (i < N) ch = S.charAt(i);
            }
            i++;
        }

        System.out.println(maxlen);

        return;
    }

}