import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        /*
         * 部分文字列を全探索
         * ATCG文字列であるかを判定する
         * */

        String S = sc.next();
        String sub;
        int cnt = 0;
        int ans = 0;

        for (int i = 0; i < S.length() + 1; i++) {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        }

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

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        /*
         * 部分文字列を全探索
         * ATCG文字列であるかを判定する
         * */

        String S = sc.next();
        String sub;
        int cnt = 0;
        int ans = 0;

        for (int i = 0; i < S.length() + 1; i++) {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        }

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

        Scanner sc = new Scanner(System.in);

        /*
         * 部分文字列を全探索
         * ATCG文字列であるかを判定する
         * */

        String S = sc.next();
        String sub;
        int cnt = 0;
        int ans = 0;

        for (int i = 0; i < S.length() + 1; i++) {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        }

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

        Scanner sc = new Scanner(System.in);

        /*
         * 部分文字列を全探索
         * ATCG文字列であるかを判定する
         * */

        String S = sc.next();
        String sub;
        int cnt = 0;
        int ans = 0;

        for (int i = 0; i < S.length() + 1; i++) {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        }

        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String sub; sub int cnt = 0; cnt 0 int ans = 0; ans 0 for (int i = 0; i < S.length() + 1; i++) {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        } int i = 0; int i = 0; i 0 i < S.length() + 1 i S.length() + 1 S.length() S.length S 1 i++ i++ i {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        } {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        } for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            } int j = i + 1; int j = i + 1; j i + 1 i 1 j < S.length() + 1 j S.length() + 1 S.length() S.length S 1 j++ j++ j {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            } {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            } sub = S.substring(i, j) sub S.substring(i, j) S.substring S i j cnt = 0 cnt 0 for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                } int k = 0; int k = 0; k 0 k < sub.length() k sub.length() sub.length sub k++ k++ k {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                } {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                } if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    } sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G' sub.charAt(k) == 'C' sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G' sub.charAt(k) == 'A' sub.charAt(k) sub.charAt sub k 'A' sub.charAt(k) == 'T' sub.charAt(k) sub.charAt sub k 'T' sub.charAt(k) == 'C' sub.charAt(k) sub.charAt sub k 'C' sub.charAt(k) == 'G' sub.charAt(k) sub.charAt sub k 'G' {
                        cnt++;
                    } cnt++ cnt {
                        break;
                    } break; ans = Math.max(ans, cnt) ans Math.max(ans, cnt) Math.max Math ans cnt System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        /*
         * 部分文字列を全探索
         * ATCG文字列であるかを判定する
         * */

        String S = sc.next();
        String sub;
        int cnt = 0;
        int ans = 0;

        for (int i = 0; i < S.length() + 1; i++) {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        }

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

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        /*
         * 部分文字列を全探索
         * ATCG文字列であるかを判定する
         * */

        String S = sc.next();
        String sub;
        int cnt = 0;
        int ans = 0;

        for (int i = 0; i < S.length() + 1; i++) {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        }

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

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        /*
         * 部分文字列を全探索
         * ATCG文字列であるかを判定する
         * */

        String S = sc.next();
        String sub;
        int cnt = 0;
        int ans = 0;

        for (int i = 0; i < S.length() + 1; i++) {
            for (int j = i + 1; j < S.length() + 1; j++) {
                sub = S.substring(i, j);
                cnt = 0;
                for (int k = 0; k < sub.length(); k++) {
                    if (sub.charAt(k) == 'A' || sub.charAt(k) == 'T' || sub.charAt(k) == 'C' || sub.charAt(k) == 'G') {
                        cnt++;
                    } else {
                        break;
                    }
                }
            }
            ans = Math.max(ans, cnt);
        }

        System.out.println(ans);
    }
}
