import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = {"A","C","G","T"};
        int count = 0;
        int max = 0;
        for(int i=0; i<a.length(); i++) {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    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 sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = {"A","C","G","T"};
        int count = 0;
        int max = 0;
        for(int i=0; i<a.length(); i++) {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            }
            if(max < count) {
                max = count;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = {"A","C","G","T"};
        int count = 0;
        int max = 0;
        for(int i=0; i<a.length(); i++) {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            }
            if(max < count) {
                max = count;
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = {"A","C","G","T"};
        int count = 0;
        int max = 0;
        for(int i=0; i<a.length(); i++) {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            }
            if(max < count) {
                max = count;
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String[] b = {"A","C","G","T"}; b {"A","C","G","T"} "A" "C" "G" "T" int count = 0; count 0 int max = 0; max 0 for(int i=0; i<a.length(); i++) {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            }
            if(max < count) {
                max = count;
            }
        } int i=0; int i=0; i 0 i<a.length() i a.length() a.length a i++ i++ i {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            }
            if(max < count) {
                max = count;
            }
        } {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            }
            if(max < count) {
                max = count;
            }
        } for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            } int j=0; int j=0; j 0 j<4 j 4 j++ j++ j {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            } {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            } if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                } a.substring(i, i+1).equals(b[j]) a.substring(i, i+1).equals a.substring(i, i+1) a.substring a i i+1 i 1 b[j] b j {
                    count++;
                    break;
                } count++ count break; if(j==3) {
                    count = 0;
                } j==3 j 3 {
                    count = 0;
                } count = 0 count 0 if(max < count) {
                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 sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = {"A","C","G","T"};
        int count = 0;
        int max = 0;
        for(int i=0; i<a.length(); i++) {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            }
            if(max < count) {
                max = count;
            }
        }
        System.out.println(max);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = {"A","C","G","T"};
        int count = 0;
        int max = 0;
        for(int i=0; i<a.length(); i++) {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    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 sc = new Scanner(System.in);
        String a = sc.next();
        String[] b = {"A","C","G","T"};
        int count = 0;
        int max = 0;
        for(int i=0; i<a.length(); i++) {
            for(int j=0; j<4; j++) {
                if(a.substring(i, i+1).equals(b[j])) {
                    count++;
                    break;
                }
                if(j==3) {
                    count = 0;
                }
            }
            if(max < count) {
                max = count;
            }
        }
        System.out.println(max);
    }
}