import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in); 
        String nyu = sc.next();
        int cnt = 0 , mem = 0 , leng;
        leng = nyu.length();
        for(int i=0 ; i < leng ; i++){
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        }
      if(cnt > mem){
            mem = cnt;
        }
        System.out.println(mem);
    }
    
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in); 
        String nyu = sc.next();
        int cnt = 0 , mem = 0 , leng;
        leng = nyu.length();
        for(int i=0 ; i < leng ; i++){
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        }
      if(cnt > mem){
            mem = cnt;
        }
        System.out.println(mem);
    }
    
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in); 
        String nyu = sc.next();
        int cnt = 0 , mem = 0 , leng;
        leng = nyu.length();
        for(int i=0 ; i < leng ; i++){
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        }
      if(cnt > mem){
            mem = cnt;
        }
        System.out.println(mem);
    } main {
        Scanner sc = new Scanner(System.in); 
        String nyu = sc.next();
        int cnt = 0 , mem = 0 , leng;
        leng = nyu.length();
        for(int i=0 ; i < leng ; i++){
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        }
      if(cnt > mem){
            mem = cnt;
        }
        System.out.println(mem);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String nyu = sc.next(); nyu sc.next() sc.next sc int cnt = 0 cnt 0 mem = 0 mem 0 leng; leng leng = nyu.length() leng nyu.length() nyu.length nyu for(int i=0 ; i < leng ; i++){
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        } int i=0 ; int i=0 ; i 0 i < leng i leng i++ i++ i {
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        } {
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        } char top = nyu.charAt(i); top nyu.charAt(i) nyu.charAt nyu i switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            } top case 'A': 'A' case 'A': cnt += 1 cnt 1 break; case 'C': 'C' case 'C': cnt += 1 cnt 1 break; case 'G': 'G' case 'G': cnt += 1 cnt 1 break; case 'T': 'T' case 'T': cnt += 1 cnt 1 break; default : default : if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    } cnt > mem cnt mem {
                        mem = cnt;
                        cnt = 0;
                    } mem = cnt mem cnt cnt = 0 cnt 0 if(cnt > mem){
            mem = cnt;
        } cnt > mem cnt mem {
            mem = cnt;
        } mem = cnt mem cnt System.out.println(mem) System.out.println System.out System System.out mem String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in); 
        String nyu = sc.next();
        int cnt = 0 , mem = 0 , leng;
        leng = nyu.length();
        for(int i=0 ; i < leng ; i++){
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        }
      if(cnt > mem){
            mem = cnt;
        }
        System.out.println(mem);
    }
    
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in); 
        String nyu = sc.next();
        int cnt = 0 , mem = 0 , leng;
        leng = nyu.length();
        for(int i=0 ; i < leng ; i++){
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        }
      if(cnt > mem){
            mem = cnt;
        }
        System.out.println(mem);
    }
    
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in); 
        String nyu = sc.next();
        int cnt = 0 , mem = 0 , leng;
        leng = nyu.length();
        for(int i=0 ; i < leng ; i++){
            char top = nyu.charAt(i);
            switch(top){
                case 'A':
                    cnt += 1;
                    break;
                case 'C':
                    cnt += 1;
                    break;
                case 'G':
                    cnt += 1;
                    break;
                case 'T':
                    cnt += 1;
                    break;
                default :
                    if(cnt > mem){
                        mem = cnt;
                        cnt = 0;
                    }
            }
        }
      if(cnt > mem){
            mem = cnt;
        }
        System.out.println(mem);
    }
    
}