import java.util.*;

public class Main {

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

        int max = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        }

        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();

        int max = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        }

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

        int max = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        }

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

        int max = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        }

        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 int max = 0; max 0 int tmp = 0; tmp 0 for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s ++i ++i i {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        } {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        } char ch = s.charAt(i); ch s.charAt(i) s.charAt s i if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0; ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T' ch == 'G' ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T' ch == 'A' ch 'A' ch == 'C' ch 'C' ch == 'G' ch 'G' ch == 'T' ch 'T' ++tmp tmp tmp = 0 tmp 0 if (tmp > max) max = tmp; tmp > max tmp max max = tmp max tmp 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();

        int max = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        }

        System.out.println(max);
    }
} public class Main {

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

        int max = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        }

        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();

        int max = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ++tmp;
            else tmp = 0;
            if (tmp > max) max = tmp;
        }

        System.out.println(max);
    }
}