import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
    public static void main(String[] args){

    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();
        ArrayList<Integer>ans  = new ArrayList<>();
        
        int cou = 0;
        for(int i=0; i<S.length(); i++) {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        }
        Collections.sort(ans,Collections.reverseOrder());
        if(ans.size()==0){	 
        	System.out.println(S.length());
        }else {
        	System.out.println(Math.max(cou,ans.get(0)));
    }
}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){

    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();
        ArrayList<Integer>ans  = new ArrayList<>();
        
        int cou = 0;
        for(int i=0; i<S.length(); i++) {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        }
        Collections.sort(ans,Collections.reverseOrder());
        if(ans.size()==0){	 
        	System.out.println(S.length());
        }else {
        	System.out.println(Math.max(cou,ans.get(0)));
    }
}
} Main public static void main(String[] args){

    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();
        ArrayList<Integer>ans  = new ArrayList<>();
        
        int cou = 0;
        for(int i=0; i<S.length(); i++) {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        }
        Collections.sort(ans,Collections.reverseOrder());
        if(ans.size()==0){	 
        	System.out.println(S.length());
        }else {
        	System.out.println(Math.max(cou,ans.get(0)));
    }
} main {

    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();
        ArrayList<Integer>ans  = new ArrayList<>();
        
        int cou = 0;
        for(int i=0; i<S.length(); i++) {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        }
        Collections.sort(ans,Collections.reverseOrder());
        if(ans.size()==0){	 
        	System.out.println(S.length());
        }else {
        	System.out.println(Math.max(cou,ans.get(0)));
    }
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char[]ss = S.toCharArray(); ss S.toCharArray() S.toCharArray S ArrayList<Integer>ans  = new ArrayList<>(); ans new ArrayList<>() int cou = 0; cou 0 for(int i=0; i<S.length(); i++) {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        } {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        } if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        } ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T' ss[i]=='G' ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T' ss[i]=='A' ss[i] ss i 'A' ss[i]=='C' ss[i] ss i 'C' ss[i]=='G' ss[i] ss i 'G' ss[i]=='T' ss[i] ss i 'T' {
        	cou++;
        } cou++ cou {
        	ans.add(cou);
                cou = 0;
        } ans.add(cou) ans.add ans cou cou = 0 cou 0 Collections.sort(ans,Collections.reverseOrder()) Collections.sort Collections ans Collections.reverseOrder() Collections.reverseOrder Collections if(ans.size()==0){	 
        	System.out.println(S.length());
        }else {
        	System.out.println(Math.max(cou,ans.get(0)));
    } ans.size()==0 ans.size() ans.size ans 0 {	 
        	System.out.println(S.length());
        } System.out.println(S.length()) System.out.println System.out System System.out S.length() S.length S {
        	System.out.println(Math.max(cou,ans.get(0)));
    } System.out.println(Math.max(cou,ans.get(0))) System.out.println System.out System System.out Math.max(cou,ans.get(0)) Math.max Math cou ans.get(0) ans.get ans 0 String[] args args public class Main {
    public static void main(String[] args){

    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();
        ArrayList<Integer>ans  = new ArrayList<>();
        
        int cou = 0;
        for(int i=0; i<S.length(); i++) {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        }
        Collections.sort(ans,Collections.reverseOrder());
        if(ans.size()==0){	 
        	System.out.println(S.length());
        }else {
        	System.out.println(Math.max(cou,ans.get(0)));
    }
}
} public class Main {
    public static void main(String[] args){

    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();
        ArrayList<Integer>ans  = new ArrayList<>();
        
        int cou = 0;
        for(int i=0; i<S.length(); i++) {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        }
        Collections.sort(ans,Collections.reverseOrder());
        if(ans.size()==0){	 
        	System.out.println(S.length());
        }else {
        	System.out.println(Math.max(cou,ans.get(0)));
    }
}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
    public static void main(String[] args){

    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();
        ArrayList<Integer>ans  = new ArrayList<>();
        
        int cou = 0;
        for(int i=0; i<S.length(); i++) {
        if(ss[i]=='A' || ss[i]=='C' || ss[i]=='G' || ss[i]=='T') {
        	cou++;
        }else {
        	ans.add(cou);
                cou = 0;
        }
        }
        Collections.sort(ans,Collections.reverseOrder());
        if(ans.size()==0){	 
        	System.out.println(S.length());
        }else {
        	System.out.println(Math.max(cou,ans.get(0)));
    }
}
}
