import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sp;
        int max = 0;
        int num = 0;
        sp = s.split("");
        for (int i = 0; i < sp.length; i++) {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        }
        if (max < num)
            max = num;
        System.out.println(max);
    }
} 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[] sp;
        int max = 0;
        int num = 0;
        sp = s.split("");
        for (int i = 0; i < sp.length; i++) {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        }
        if (max < num)
            max = num;
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sp;
        int max = 0;
        int num = 0;
        sp = s.split("");
        for (int i = 0; i < sp.length; i++) {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        }
        if (max < num)
            max = num;
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sp;
        int max = 0;
        int num = 0;
        sp = s.split("");
        for (int i = 0; i < sp.length; i++) {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        }
        if (max < num)
            max = num;
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String[] sp; sp int max = 0; max 0 int num = 0; num 0 sp = s.split("") sp s.split("") s.split s "" for (int i = 0; i < sp.length; i++) {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        } int i = 0; int i = 0; i 0 i < sp.length i sp.length sp sp.length i++ i++ i {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        } {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        } if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            } sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T") sp[i].equals("G") sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T") sp[i].equals("A") sp[i].equals sp[i] sp i "A" sp[i].equals("C") sp[i].equals sp[i] sp i "C" sp[i].equals("G") sp[i].equals sp[i] sp i "G" sp[i].equals("T") sp[i].equals sp[i] sp i "T" num++ num {
                if (max < num)
                    max = num;
                num = 0;
            } if (max < num)
                    max = num; max < num max num max = num max num num = 0 num 0 if (max < num)
            max = num; max < num max num max = num max num System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sp;
        int max = 0;
        int num = 0;
        sp = s.split("");
        for (int i = 0; i < sp.length; i++) {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        }
        if (max < num)
            max = num;
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sp;
        int max = 0;
        int num = 0;
        sp = s.split("");
        for (int i = 0; i < sp.length; i++) {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        }
        if (max < num)
            max = num;
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] sp;
        int max = 0;
        int num = 0;
        sp = s.split("");
        for (int i = 0; i < sp.length; i++) {
            if (sp[i].equals("A") || sp[i].equals("C") || sp[i].equals("G") || sp[i].equals("T"))
                num++;
            else {
                if (max < num)
                    max = num;
                num = 0;
            }
        }
        if (max < num)
            max = num;
        System.out.println(max);
    }
}