import java.util.Scanner;

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

        int max = 0;
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        }
        if (max < count) max = count;

        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 str = in.nextLine();
        in.close();

        int max = 0;
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        }
        if (max < count) max = count;

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

        int max = 0;
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        }
        if (max < count) max = count;

        System.out.println(max);
    } main {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        in.close();

        int max = 0;
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        }
        if (max < count) max = count;

        System.out.println(max);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String str = in.nextLine(); str in.nextLine() in.nextLine in in.close() in.close in int max = 0; max 0 int count = 0; count 0 for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        } {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        } char a = str.charAt(i); a str.charAt(i) str.charAt str i if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            } a == 'A' || a == 'C'|| a == 'G' || a == 'T' a == 'G' a == 'A' || a == 'C'|| a == 'G' || a == 'T' a == 'A' a 'A' a == 'C' a 'C' a == 'G' a 'G' a == 'T' a 'T' {
                count++;
            } count++ count {
                if (max < count) max = count;
                count = 0;
            } if (max < count) max = count; max < count max count max = count max count count = 0 count 0 if (max < count) max = count; max < count max count max = count max count 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 str = in.nextLine();
        in.close();

        int max = 0;
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        }
        if (max < count) max = count;

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

        int max = 0;
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        }
        if (max < count) max = count;

        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 str = in.nextLine();
        in.close();

        int max = 0;
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            char a = str.charAt(i);
            if (a == 'A' || a == 'C'|| a == 'G' || a == 'T') {
                count++;
            } else {
                if (max < count) max = count;
                count = 0;
            }
        }
        if (max < count) max = count;

        System.out.println(max);
    }
}