import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] sa = s.split("");
        int n = s.length();
        int sum=0;
        int max=0;
        for(int i=0;i<n;i++){
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] sa = s.split("");
        int n = s.length();
        int sum=0;
        int max=0;
        for(int i=0;i<n;i++){
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] sa = s.split("");
        int n = s.length();
        int sum=0;
        int max=0;
        for(int i=0;i<n;i++){
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] sa = s.split("");
        int n = s.length();
        int sum=0;
        int max=0;
        for(int i=0;i<n;i++){
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String[] sa = s.split(""); sa s.split("") s.split s "" int n = s.length(); n s.length() s.length s int sum=0; sum 0 int max=0; max 0 for(int i=0;i<n;i++){
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        } {
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        } if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            } sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T") sa[i].equals("G") sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T") sa[i].equals("A") sa[i].equals sa[i] sa i "A" sa[i].equals("C") sa[i].equals sa[i] sa i "C" sa[i].equals("G") sa[i].equals sa[i] sa i "G" sa[i].equals("T") sa[i].equals sa[i] sa i "T" {
                sum++;
            } sum++ sum {
                sum=0;
            } sum=0 sum 0 if (sum>=max){
                max=sum;
            } sum>=max sum max {
                max=sum;
            } max=sum max sum 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) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] sa = s.split("");
        int n = s.length();
        int sum=0;
        int max=0;
        for(int i=0;i<n;i++){
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        }
        System.out.println(max);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] sa = s.split("");
        int n = s.length();
        int sum=0;
        int max=0;
        for(int i=0;i<n;i++){
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        }
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] sa = s.split("");
        int n = s.length();
        int sum=0;
        int max=0;
        for(int i=0;i<n;i++){
            if (sa[i].equals("A")|| sa[i].equals("C")||sa[i].equals("G")||sa[i].equals("T")) {
                sum++;
            }else{
                sum=0;
            }
            if (sum>=max){
                max=sum;
            }
        }
        System.out.println(max);
    }
}
