import java.util.*;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sList = s.split("[^(ACGT)]", 0);

        if (sList.length != 0) {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } else {
            System.out.println(0);
        }

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

        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sList = s.split("[^(ACGT)]", 0);

        if (sList.length != 0) {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } else {
            System.out.println(0);
        }

    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sList = s.split("[^(ACGT)]", 0);

        if (sList.length != 0) {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } else {
            System.out.println(0);
        }

    } main {

        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sList = s.split("[^(ACGT)]", 0);

        if (sList.length != 0) {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } else {
            System.out.println(0);
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String[] sList = s.split("[^(ACGT)]", 0); sList s.split("[^(ACGT)]", 0) s.split s "[^(ACGT)]" 0 if (sList.length != 0) {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } else {
            System.out.println(0);
        } sList.length != 0 sList.length sList sList.length 0 {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } int[] iList = new int[sList.length]; iList new int[sList.length] sList.length sList sList.length for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            } int i = 0; int i = 0; i 0 i < sList.length i sList.length sList sList.length i++ i++ i {
                iList[i] = sList[i].length();
            } {
                iList[i] = sList[i].length();
            } iList[i] = sList[i].length() iList[i] iList i sList[i].length() sList[i].length sList[i] sList i Arrays.sort(iList) Arrays.sort Arrays iList System.out.println(iList[iList.length - 1]) System.out.println System.out System System.out iList[iList.length - 1] iList iList.length - 1 iList.length iList iList.length 1 {
            System.out.println(0);
        } System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sList = s.split("[^(ACGT)]", 0);

        if (sList.length != 0) {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } else {
            System.out.println(0);
        }

    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sList = s.split("[^(ACGT)]", 0);

        if (sList.length != 0) {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } else {
            System.out.println(0);
        }

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sList = s.split("[^(ACGT)]", 0);

        if (sList.length != 0) {
            int[] iList = new int[sList.length];

            for (int i = 0; i < sList.length; i++) {
                iList[i] = sList[i].length();
            }
            Arrays.sort(iList);


            System.out.println(iList[iList.length - 1]);
        } else {
            System.out.println(0);
        }

    }
}