import java.util.Scanner;
 
public class Main {
 
    public static void main(String[] args) throws Exception {
        B();
    }
 
    public static void B() throws Exception {
        Scanner scanner = new Scanner( System.in );
        String S = scanner.next();
        boolean inACGT = false;
        int start = 0, len = 0;
        for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        }
        if (inACGT) len = Math.max( len, S.length() - start);
        System.out.println(len);
    }
 
} import java.util.Scanner; Scanner java.util public class Main {
 
    public static void main(String[] args) throws Exception {
        B();
    }
 
    public static void B() throws Exception {
        Scanner scanner = new Scanner( System.in );
        String S = scanner.next();
        boolean inACGT = false;
        int start = 0, len = 0;
        for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        }
        if (inACGT) len = Math.max( len, S.length() - start);
        System.out.println(len);
    }
 
} Main public static void main(String[] args) throws Exception {
        B();
    } main {
        B();
    } B() B String[] args args public static void B() throws Exception {
        Scanner scanner = new Scanner( System.in );
        String S = scanner.next();
        boolean inACGT = false;
        int start = 0, len = 0;
        for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        }
        if (inACGT) len = Math.max( len, S.length() - start);
        System.out.println(len);
    } B {
        Scanner scanner = new Scanner( System.in );
        String S = scanner.next();
        boolean inACGT = false;
        int start = 0, len = 0;
        for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        }
        if (inACGT) len = Math.max( len, S.length() - start);
        System.out.println(len);
    } Scanner scanner = new Scanner( System.in ); scanner new Scanner( System.in ) String S = scanner.next(); S scanner.next() scanner.next scanner boolean inACGT = false; inACGT false int start = 0 start 0 len = 0; len 0 for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        } {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        } char c = S.charAt( i ); c S.charAt( i ) S.charAt S i boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T'; isACGT 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' if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            } inACGT {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                } !isACGT isACGT {
                    inACGT = false;
                    len = Math.max( len, i - start);
                } inACGT = false inACGT false len = Math.max( len, i - start) len Math.max( len, i - start) Math.max Math len i - start i start {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            } if (isACGT) {
                    inACGT = true;
                    start = i;
                } isACGT {
                    inACGT = true;
                    start = i;
                } inACGT = true inACGT true start = i start i if (inACGT) len = Math.max( len, S.length() - start); inACGT len = Math.max( len, S.length() - start) len Math.max( len, S.length() - start) Math.max Math len S.length() - start S.length() S.length S start System.out.println(len) System.out.println System.out System System.out len public class Main {
 
    public static void main(String[] args) throws Exception {
        B();
    }
 
    public static void B() throws Exception {
        Scanner scanner = new Scanner( System.in );
        String S = scanner.next();
        boolean inACGT = false;
        int start = 0, len = 0;
        for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        }
        if (inACGT) len = Math.max( len, S.length() - start);
        System.out.println(len);
    }
 
} public class Main {
 
    public static void main(String[] args) throws Exception {
        B();
    }
 
    public static void B() throws Exception {
        Scanner scanner = new Scanner( System.in );
        String S = scanner.next();
        boolean inACGT = false;
        int start = 0, len = 0;
        for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        }
        if (inACGT) len = Math.max( len, S.length() - start);
        System.out.println(len);
    }
 
} Main
import java.util.Scanner;
 
public class Main {
 
    public static void main(String[] args) throws Exception {
        B();
    }
 
    public static void B() throws Exception {
        Scanner scanner = new Scanner( System.in );
        String S = scanner.next();
        boolean inACGT = false;
        int start = 0, len = 0;
        for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        }
        if (inACGT) len = Math.max( len, S.length() - start);
        System.out.println(len);
    }
 
}