import java.util.*;
import java.lang.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int maxresult = 0;
        int kari = 0;
        for(int i = 0;i < s.length();i++){
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        }
        if(kari>maxresult){
            maxresult = kari;
            kari = 0;
        }
        System.out.println(maxresult);
        sc.close();
    }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int maxresult = 0;
        int kari = 0;
        for(int i = 0;i < s.length();i++){
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        }
        if(kari>maxresult){
            maxresult = kari;
            kari = 0;
        }
        System.out.println(maxresult);
        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int maxresult = 0;
        int kari = 0;
        for(int i = 0;i < s.length();i++){
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        }
        if(kari>maxresult){
            maxresult = kari;
            kari = 0;
        }
        System.out.println(maxresult);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int maxresult = 0;
        int kari = 0;
        for(int i = 0;i < s.length();i++){
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        }
        if(kari>maxresult){
            maxresult = kari;
            kari = 0;
        }
        System.out.println(maxresult);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int maxresult = 0; maxresult 0 int kari = 0; kari 0 for(int i = 0;i < s.length();i++){
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        } {
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        } char a = s.charAt(i); a s.charAt(i) s.charAt s i if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            } a=='A'||a=='C'||a=='G'||a=='T' a=='G' a=='A'||a=='C'||a=='G'||a=='T' a=='A' a 'A' a=='C' a 'C' a=='G' a 'G' a=='T' a 'T' {
                kari += 1;
            } kari += 1 kari 1 {
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            } if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                } kari>maxresult kari maxresult {
                    maxresult = kari;
                    kari = 0;
                } maxresult = kari maxresult kari kari = 0 kari 0 if(kari>maxresult){
            maxresult = kari;
            kari = 0;
        } kari>maxresult kari maxresult {
            maxresult = kari;
            kari = 0;
        } maxresult = kari maxresult kari kari = 0 kari 0 System.out.println(maxresult) System.out.println System.out System System.out maxresult 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 maxresult = 0;
        int kari = 0;
        for(int i = 0;i < s.length();i++){
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        }
        if(kari>maxresult){
            maxresult = kari;
            kari = 0;
        }
        System.out.println(maxresult);
        sc.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int maxresult = 0;
        int kari = 0;
        for(int i = 0;i < s.length();i++){
            char a = s.charAt(i);
            if(a=='A'||a=='C'||a=='G'||a=='T'){
                kari += 1;
            }else{
                if(kari>maxresult){
                    maxresult = kari;
                    kari = 0;
                }
            }
        }
        if(kari>maxresult){
            maxresult = kari;
            kari = 0;
        }
        System.out.println(maxresult);
        sc.close();
    }
} Main
import java.util.*;
import java.lang.*;

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