import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int n = s.length;
        int max = 0;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        }
        System.out.println(max);

    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int n = s.length;
        int max = 0;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        }
        System.out.println(max);

    }

} Main public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int n = s.length;
        int max = 0;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        }
        System.out.println(max);

    } main {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int n = s.length;
        int max = 0;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        }
        System.out.println(max);

    } @SuppressWarnings("resource")
        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 n = s.length; n s.length s s.length int max = 0; max 0 for (int i = 0 ; i < n ; i++) {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        } {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        } for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            } int j = i ; int j = i ; j i j < n j n j++ j++ j {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            } {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            } boolean flg = true; flg true for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                } int k = i ; int k = i ; k i k <= j k j k++ k++ k {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                } {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                } if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false; s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G' s[k] != 'C' s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G' s[k] != 'A' s[k] s k 'A' s[k] != 'T' s[k] s k 'T' s[k] != 'C' s[k] s k 'C' s[k] != 'G' s[k] s k 'G' flg = false flg false if (flg) max = Math.max(max, j - i + 1); flg max = Math.max(max, j - i + 1) max Math.max(max, j - i + 1) Math.max Math max j - i + 1 j - i j i 1 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) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int n = s.length;
        int max = 0;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        }
        System.out.println(max);

    }

} public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int n = s.length;
        int max = 0;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        }
        System.out.println(max);

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int n = s.length;
        int max = 0;
        for (int i = 0 ; i < n ; i++) {
            for (int j = i ; j < n ; j++) {
                boolean flg = true;
                for (int k = i ; k <= j ; k++) {
                    if (s[k] != 'A' && s[k] != 'T' && s[k] != 'C' && s[k] != 'G') flg = false;
                }
                if (flg) max = Math.max(max, j - i + 1);
            }
        }
        System.out.println(max);

    }

}
