import java.util.*;

public class Main {

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

        int ans = 0;
        int count = 0;
        for (Character c : s.toCharArray()) {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        }

        System.out.print(Math.max(ans, count));
    }

} import java.util.*; util.* java public class Main {

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

        int ans = 0;
        int count = 0;
        for (Character c : s.toCharArray()) {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        }

        System.out.print(Math.max(ans, count));
    }

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

        int ans = 0;
        int count = 0;
        for (Character c : s.toCharArray()) {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        }

        System.out.print(Math.max(ans, count));
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();

        int ans = 0;
        int count = 0;
        for (Character c : s.toCharArray()) {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        }

        System.out.print(Math.max(ans, count));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int ans = 0; ans 0 int count = 0; count 0 for (Character c : s.toCharArray()) {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        } Character c s.toCharArray() s.toCharArray s {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        } {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        } if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            } c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'G' c == 'A' || c == 'C' || c == 'G' || c == 'T' c == 'A' c 'A' c == 'C' c 'C' c == 'G' c 'G' c == 'T' c 'T' {
                count++;
            } count++ count {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            } if (ans < count) {
                    ans = count;
                    count = 0;
                } ans < count ans count {
                    ans = count;
                    count = 0;
                } ans = count ans count count = 0 count 0 System.out.print(Math.max(ans, count)) System.out.print System.out System System.out Math.max(ans, count) Math.max Math ans count String[] args args public class Main {

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

        int ans = 0;
        int count = 0;
        for (Character c : s.toCharArray()) {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        }

        System.out.print(Math.max(ans, count));
    }

} public class Main {

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

        int ans = 0;
        int count = 0;
        for (Character c : s.toCharArray()) {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        }

        System.out.print(Math.max(ans, count));
    }

} Main
import java.util.*;

public class Main {

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

        int ans = 0;
        int count = 0;
        for (Character c : s.toCharArray()) {
            if (c == 'A' || c == 'C' || c == 'G' || c == 'T') {
                count++;
            } else {
                if (ans < count) {
                    ans = count;
                    count = 0;
                }
            }
        }

        System.out.print(Math.max(ans, count));
    }

}