import java.util.Scanner;

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

        int count = 0;
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        }
        max = Math.max(count, max);

        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();

        int count = 0;
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        }
        max = Math.max(count, max);

        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();

        int count = 0;
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        }
        max = Math.max(count, max);

        System.out.println(max);
    } main {
        Scanner in = new Scanner(System.in);
        String s = in.next();

        int count = 0;
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        }
        max = Math.max(count, max);

        System.out.println(max);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next(); s in.next() in.next in int count = 0; count 0 int max = 0; max 0 for (int i = 0; i < s.length(); i++) {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        } {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        } if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            } "ACGT".contains(s.substring(i, i + 1)) "ACGT".contains "ACGT" s.substring(i, i + 1) s.substring s i i + 1 i 1 {
                count++;
            } count++ count {
                max = Math.max(count, max);
                count = 0;
            } max = Math.max(count, max) max Math.max(count, max) Math.max Math count max count = 0 count 0 max = Math.max(count, max) max Math.max(count, max) Math.max Math count max 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 in = new Scanner(System.in);
        String s = in.next();

        int count = 0;
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        }
        max = Math.max(count, max);

        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();

        int count = 0;
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        }
        max = Math.max(count, max);

        System.out.println(max);
    }
} Main
import java.util.Scanner;

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

        int count = 0;
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            if ("ACGT".contains(s.substring(i, i + 1))) {
                count++;
            } else {
                max = Math.max(count, max);
                count = 0;
            }
        }
        max = Math.max(count, max);

        System.out.println(max);
    }
}
