import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split("");
        int len = 0;
        int r = 0;
        for (String s :
                S) {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        }
        System.out.println(r);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split("");
        int len = 0;
        int r = 0;
        for (String s :
                S) {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        }
        System.out.println(r);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split("");
        int len = 0;
        int r = 0;
        for (String s :
                S) {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        }
        System.out.println(r);
    } main {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split("");
        int len = 0;
        int r = 0;
        for (String s :
                S) {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        }
        System.out.println(r);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] S = sc.nextLine().split(""); S sc.nextLine().split("") sc.nextLine().split sc.nextLine() sc.nextLine sc "" int len = 0; len 0 int r = 0; r 0 for (String s :
                S) {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        } String s S {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        } {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        } if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            } s.matches("(A|C|G|T)") s.matches s "(A|C|G|T)" {
                len++;
                if (len > r) r = len;
            } len++ len if (len > r) r = len; len > r len r r = len r len {
                len = 0;
            } len = 0 len 0 System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split("");
        int len = 0;
        int r = 0;
        for (String s :
                S) {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        }
        System.out.println(r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split("");
        int len = 0;
        int r = 0;
        for (String s :
                S) {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        }
        System.out.println(r);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] S = sc.nextLine().split("");
        int len = 0;
        int r = 0;
        for (String s :
                S) {
            if (s.matches("(A|C|G|T)")) {
                len++;
                if (len > r) r = len;
            } else {
                len = 0;
            }
        }
        System.out.println(r);
    }
}