import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();
        int v = 0;
        int max = 0;
        
        for(int i=0;i<ch.length;i++){
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();
        int v = 0;
        int max = 0;
        
        for(int i=0;i<ch.length;i++){
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();
        int v = 0;
        int max = 0;
        
        for(int i=0;i<ch.length;i++){
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();
        int v = 0;
        int max = 0;
        
        for(int i=0;i<ch.length;i++){
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc char[] ch = str.toCharArray(); ch str.toCharArray() str.toCharArray str int v = 0; v 0 int max = 0; max 0 for(int i=0;i<ch.length;i++){
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        } int i=0; int i=0; i 0 i<ch.length i ch.length ch ch.length i++ i++ i {
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        } {
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        } if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            } ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T' ch[i]=='G' ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T' ch[i]=='A' ch[i] ch i 'A' ch[i]=='C' ch[i] ch i 'C' ch[i]=='G' ch[i] ch i 'G' ch[i]=='T' ch[i] ch i 'T' {
                v = v+1;
            } v = v+1 v v+1 v 1 {
                if(max<v){
                    max = v;
                }
                v = 0;
            } if(max<v){
                    max = v;
                } max<v max v {
                    max = v;
                } max = v max v v = 0 v 0 if(max<v){
                max = v;
            } max<v max v {
                max = v;
            } max = v max v 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();
        int v = 0;
        int max = 0;
        
        for(int i=0;i<ch.length;i++){
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();
        int v = 0;
        int max = 0;
        
        for(int i=0;i<ch.length;i++){
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        }
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] ch = str.toCharArray();
        int v = 0;
        int max = 0;
        
        for(int i=0;i<ch.length;i++){
            if(ch[i]=='A'||ch[i]=='C'||ch[i]=='G'||ch[i]=='T'){
                v = v+1;
            }else{
                if(max<v){
                    max = v;
                }
                v = 0;
            }
            
            if(max<v){
                max = v;
            }
        }
        System.out.println(max);
    }
}
