import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String val1 = sc.next();

        int count = 0;
        String temp = "";
        for (int i = 0; i < val1.length(); i++) {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        }
        if (count < temp.length()) {
            count = temp.length();
        }
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String val1 = sc.next();

        int count = 0;
        String temp = "";
        for (int i = 0; i < val1.length(); i++) {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        }
        if (count < temp.length()) {
            count = temp.length();
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String val1 = sc.next();

        int count = 0;
        String temp = "";
        for (int i = 0; i < val1.length(); i++) {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        }
        if (count < temp.length()) {
            count = temp.length();
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);

        String val1 = sc.next();

        int count = 0;
        String temp = "";
        for (int i = 0; i < val1.length(); i++) {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        }
        if (count < temp.length()) {
            count = temp.length();
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String val1 = sc.next(); val1 sc.next() sc.next sc int count = 0; count 0 String temp = ""; temp "" for (int i = 0; i < val1.length(); i++) {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        } int i = 0; int i = 0; i 0 i < val1.length() i val1.length() val1.length val1 i++ i++ i {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        } {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        } String target = "" + val1.charAt(i); target "" + val1.charAt(i) "" val1.charAt(i) val1.charAt val1 i switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            } target case "A": "A" case "A": case "C": "C" case "C": case "G": "G" case "G": case "T": "T" case "T": temp = temp + val1.charAt(i) temp temp + val1.charAt(i) temp val1.charAt(i) val1.charAt val1 i continue; default: default: if (count < temp.length()) {
                        count = temp.length();
                    } count < temp.length() count temp.length() temp.length temp {
                        count = temp.length();
                    } count = temp.length() count temp.length() temp.length temp temp = "" temp "" if (count < temp.length()) {
            count = temp.length();
        } count < temp.length() count temp.length() temp.length temp {
            count = temp.length();
        } count = temp.length() count temp.length() temp.length temp System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String val1 = sc.next();

        int count = 0;
        String temp = "";
        for (int i = 0; i < val1.length(); i++) {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        }
        if (count < temp.length()) {
            count = temp.length();
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String val1 = sc.next();

        int count = 0;
        String temp = "";
        for (int i = 0; i < val1.length(); i++) {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        }
        if (count < temp.length()) {
            count = temp.length();
        }
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String val1 = sc.next();

        int count = 0;
        String temp = "";
        for (int i = 0; i < val1.length(); i++) {
            // ACGT
            String target = "" + val1.charAt(i);
            switch (target) {
                case "A":
                case "C":
                case "G":
                case "T":
                    temp = temp + val1.charAt(i);
                    continue;
                default:
                    if (count < temp.length()) {
                        count = temp.length();
                    }
                    temp = "";
            }
        }
        if (count < temp.length()) {
            count = temp.length();
        }
        System.out.println(count);
    }
}