import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int result = 0;
        int max = 0;
        for (char c : s) {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        }
        if (max > 0) {
            result = Math.max(result, max);
        }

        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int result = 0;
        int max = 0;
        for (char c : s) {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        }
        if (max > 0) {
            result = Math.max(result, max);
        }

        System.out.println(result);
    }
} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int result = 0;
        int max = 0;
        for (char c : s) {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        }
        if (max > 0) {
            result = Math.max(result, max);
        }

        System.out.println(result);
    } main {

        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int result = 0;
        int max = 0;
        for (char c : s) {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        }
        if (max > 0) {
            result = Math.max(result, max);
        }

        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int result = 0; result 0 int max = 0; max 0 for (char c : s) {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        } char c s {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        } {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        } if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            } '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' c {
                max++;
            } max++ max {
                result = Math.max(result, max);
                max = 0;
            } result = Math.max(result, max) result Math.max(result, max) Math.max Math result max max = 0 max 0 if (max > 0) {
            result = Math.max(result, max);
        } max > 0 max 0 {
            result = Math.max(result, max);
        } result = Math.max(result, max) result Math.max(result, max) Math.max Math result max System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int result = 0;
        int max = 0;
        for (char c : s) {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        }
        if (max > 0) {
            result = Math.max(result, max);
        }

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

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int result = 0;
        int max = 0;
        for (char c : s) {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        }
        if (max > 0) {
            result = Math.max(result, max);
        }

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

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        int result = 0;
        int max = 0;
        for (char c : s) {
            if ('A' == c || 'C' == c || 'G' == c || 'T' == c) {
                max++;
            } else {
                result = Math.max(result, max);
                max = 0;
            }
        }
        if (max > 0) {
            result = Math.max(result, max);
        }

        System.out.println(result);
    }
}