import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();

        int maxCnt = 0;
        int cnt = 0;

        for(int c: str.toCharArray()){
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        }

        maxCnt = Math.max(maxCnt, cnt);

        System.out.println(maxCnt);

    }

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

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();

        int maxCnt = 0;
        int cnt = 0;

        for(int c: str.toCharArray()){
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        }

        maxCnt = Math.max(maxCnt, cnt);

        System.out.println(maxCnt);

    }

} Main public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();

        int maxCnt = 0;
        int cnt = 0;

        for(int c: str.toCharArray()){
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        }

        maxCnt = Math.max(maxCnt, cnt);

        System.out.println(maxCnt);

    } main {

        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();

        int maxCnt = 0;
        int cnt = 0;

        for(int c: str.toCharArray()){
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        }

        maxCnt = Math.max(maxCnt, cnt);

        System.out.println(maxCnt);

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String str = scanner.nextLine(); str scanner.nextLine() scanner.nextLine scanner int maxCnt = 0; maxCnt 0 int cnt = 0; cnt 0 for(int c: str.toCharArray()){
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        } int c str.toCharArray() str.toCharArray str {
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        } {
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        } if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            } c == 'A' || c == 'T' || c == 'C' || c == 'G' c == 'C' c == 'A' || c == 'T' || c == 'C' || c == 'G' c == 'A' c 'A' c == 'T' c 'T' c == 'C' c 'C' c == 'G' c 'G' {
                cnt++;
            } cnt++ cnt {
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            } maxCnt = Math.max(maxCnt, cnt) maxCnt Math.max(maxCnt, cnt) Math.max Math maxCnt cnt cnt = 0 cnt 0 maxCnt = Math.max(maxCnt, cnt) maxCnt Math.max(maxCnt, cnt) Math.max Math maxCnt cnt System.out.println(maxCnt) System.out.println System.out System System.out maxCnt String[] args args public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();

        int maxCnt = 0;
        int cnt = 0;

        for(int c: str.toCharArray()){
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        }

        maxCnt = Math.max(maxCnt, cnt);

        System.out.println(maxCnt);

    }

} public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();

        int maxCnt = 0;
        int cnt = 0;

        for(int c: str.toCharArray()){
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        }

        maxCnt = Math.max(maxCnt, cnt);

        System.out.println(maxCnt);

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();

        int maxCnt = 0;
        int cnt = 0;

        for(int c: str.toCharArray()){
            if(c == 'A' || c == 'T' || c == 'C' || c == 'G'){
                cnt++;
            }else{
                maxCnt = Math.max(maxCnt, cnt);
                cnt = 0;
            }
        }

        maxCnt = Math.max(maxCnt, cnt);

        System.out.println(maxCnt);

    }

}
