import java.util.*;
class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	String word = scan.next();
      	int ans = 0;
      	int subans =0;
      	for(int i=0;i<word.length();i++){
        	if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            }
        }
      	if(ans < subans){
                	ans = subans;
        }
      	System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	String word = scan.next();
      	int ans = 0;
      	int subans =0;
      	for(int i=0;i<word.length();i++){
        	if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            }
        }
      	if(ans < subans){
                	ans = subans;
        }
      	System.out.println(ans);
    }
} Main public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	String word = scan.next();
      	int ans = 0;
      	int subans =0;
      	for(int i=0;i<word.length();i++){
        	if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            }
        }
      	if(ans < subans){
                	ans = subans;
        }
      	System.out.println(ans);
    } main {
    	Scanner scan = new Scanner(System.in);
      	String word = scan.next();
      	int ans = 0;
      	int subans =0;
      	for(int i=0;i<word.length();i++){
        	if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            }
        }
      	if(ans < subans){
                	ans = subans;
        }
      	System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String word = scan.next(); word scan.next() scan.next scan int ans = 0; ans 0 int subans =0; subans 0 for(int i=0;i<word.length();i++){
        	if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            }
        } int i=0; int i=0; i 0 i<word.length() i word.length() word.length word i++ i++ i {
        	if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            }
        } {
        	if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            }
        } if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            } word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A") word.substring(i,i+1).equals("T") word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A") word.substring(i,i+1).equals("C") word.substring(i,i+1).equals word.substring(i,i+1) word.substring word i i+1 i 1 "C" word.substring(i,i+1).equals("G") word.substring(i,i+1).equals word.substring(i,i+1) word.substring word i i+1 i 1 "G" word.substring(i,i+1).equals("T") word.substring(i,i+1).equals word.substring(i,i+1) word.substring word i i+1 i 1 "T" word.substring(i,i+1).equals("A") word.substring(i,i+1).equals word.substring(i,i+1) word.substring word i i+1 i 1 "A" {
            	subans++;
            } subans++ subans {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            } if(ans < subans){
                	ans = subans;
                } ans < subans ans subans {
                	ans = subans;
                } ans = subans ans subans subans = 0 subans 0 if(ans < subans){
                	ans = subans;
        } ans < subans ans subans {
                	ans = subans;
        } ans = subans ans subans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	String word = scan.next();
      	int ans = 0;
      	int subans =0;
      	for(int i=0;i<word.length();i++){
        	if(word.substring(i,i+1).equals("C") || word.substring(i,i+1).equals("G") || word.substring(i,i+1).equals("T") ||word.substring(i,i+1).equals("A")){
            	subans++;
            } else {
            	if(ans < subans){
                	ans = subans;
                }
              	subans = 0;
            }
        }
      	if(ans < subans){
                	ans = subans;
        }
      	System.out.println(ans);
    }
}