import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        String[] ss = sc.next().split("[^ACGT]");
        if (ss.length == 0) {
            out.println("0");
        } else {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        }
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        String[] ss = sc.next().split("[^ACGT]");
        if (ss.length == 0) {
            out.println("0");
        } else {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        }
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        String[] ss = sc.next().split("[^ACGT]");
        if (ss.length == 0) {
            out.println("0");
        } else {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        }
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        String[] ss = sc.next().split("[^ACGT]");
        if (ss.length == 0) {
            out.println("0");
        } else {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        }
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) String[] ss = sc.next().split("[^ACGT]"); ss sc.next().split("[^ACGT]") sc.next().split sc.next() sc.next sc "[^ACGT]" if (ss.length == 0) {
            out.println("0");
        } else {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        } ss.length == 0 ss.length ss ss.length 0 {
            out.println("0");
        } out.println("0") out.println out "0" {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        } Integer[] a = new Integer[ss.length]; a new Integer[ss.length] ss.length ss ss.length for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            } int i = 0; int i = 0; i 0 i < ss.length i ss.length ss ss.length i++ i++ i {
                a[i] = ss[i].length();
            } {
                a[i] = ss[i].length();
            } a[i] = ss[i].length() a[i] a i ss[i].length() ss[i].length ss[i] ss i Arrays.sort(a, Collections.reverseOrder()) Arrays.sort Arrays a Collections.reverseOrder() Collections.reverseOrder Collections out.println(a[0]) out.println out a[0] a 0 out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        String[] ss = sc.next().split("[^ACGT]");
        if (ss.length == 0) {
            out.println("0");
        } else {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        }
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        String[] ss = sc.next().split("[^ACGT]");
        if (ss.length == 0) {
            out.println("0");
        } else {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        }
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        String[] ss = sc.next().split("[^ACGT]");
        if (ss.length == 0) {
            out.println("0");
        } else {
            Integer[] a = new Integer[ss.length];
            for (int i = 0; i < ss.length; i++) {
                a[i] = ss[i].length();
            }
            Arrays.sort(a, Collections.reverseOrder());
            out.println(a[0]);
        }
        
        out.flush();
    }
}