import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        }
        if(ans < tmp) ans = tmp;
        System.out.println(ans);
        sc.close();

    }

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        }
        if(ans < tmp) ans = tmp;
        System.out.println(ans);
        sc.close();

    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        }
        if(ans < tmp) ans = tmp;
        System.out.println(ans);
        sc.close();

    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        }
        if(ans < tmp) ans = tmp;
        System.out.println(ans);
        sc.close();

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int ans = 0; ans 0 int tmp = 0; tmp 0 for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        } {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        } if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            } s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G' s.charAt(i) == 'C' s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G' s.charAt(i) == 'A' s.charAt(i) s.charAt s i 'A' s.charAt(i) == 'T' s.charAt(i) s.charAt s i 'T' s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' s.charAt(i) == 'G' s.charAt(i) s.charAt s i 'G' {
                tmp++;
            } tmp++ tmp if(ans < tmp){
                ans = tmp;
                tmp = 0;
            } ans < tmp ans tmp {
                ans = tmp;
                tmp = 0;
            } ans = tmp ans tmp tmp = 0 tmp 0 if(ans < tmp) ans = tmp; ans < tmp ans tmp ans = tmp ans tmp System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        }
        if(ans < tmp) ans = tmp;
        System.out.println(ans);
        sc.close();

    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        }
        if(ans < tmp) ans = tmp;
        System.out.println(ans);
        sc.close();

    }

} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int ans = 0;
        int tmp = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'A' ||s.charAt(i) == 'T' ||s.charAt(i) == 'C' ||s.charAt(i) == 'G'){
                tmp++;
            }else if(ans < tmp){
                ans = tmp;
                tmp = 0;
            }
        }
        if(ans < tmp) ans = tmp;
        System.out.println(ans);
        sc.close();

    }

}
