import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      String str = sc.next();
      int a = 0;
      int result = 0;
      for(int i = 0;i < str.length();i++){
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      }
      System.out.println(result);
    }
  
  	public static int getLength(String s,int n,int total){
      if(n >= s.length()){
      	return total;
      }
      char x = s.charAt(n);
      if(x=='A'||x=='C'||x=='G'||x=='T'){
      	return getLength(s,n+1,total)+1;
      }else{
      	return total;
      }
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      String str = sc.next();
      int a = 0;
      int result = 0;
      for(int i = 0;i < str.length();i++){
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      }
      System.out.println(result);
    }
  
  	public static int getLength(String s,int n,int total){
      if(n >= s.length()){
      	return total;
      }
      char x = s.charAt(n);
      if(x=='A'||x=='C'||x=='G'||x=='T'){
      	return getLength(s,n+1,total)+1;
      }else{
      	return total;
      }
    }
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      String str = sc.next();
      int a = 0;
      int result = 0;
      for(int i = 0;i < str.length();i++){
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      }
      System.out.println(result);
    } main {
    	Scanner sc = new Scanner(System.in);
      String str = sc.next();
      int a = 0;
      int result = 0;
      for(int i = 0;i < str.length();i++){
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      }
      System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int a = 0; a 0 int result = 0; result 0 for(int i = 0;i < str.length();i++){
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      } {
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      } a = getLength(str,i,0) a getLength(str,i,0) getLength str i 0 result = Math.max(a,result) result Math.max(a,result) Math.max Math a result System.out.println(result) System.out.println System.out System System.out result String[] args args public static int getLength(String s,int n,int total){
      if(n >= s.length()){
      	return total;
      }
      char x = s.charAt(n);
      if(x=='A'||x=='C'||x=='G'||x=='T'){
      	return getLength(s,n+1,total)+1;
      }else{
      	return total;
      }
    } getLength {
      if(n >= s.length()){
      	return total;
      }
      char x = s.charAt(n);
      if(x=='A'||x=='C'||x=='G'||x=='T'){
      	return getLength(s,n+1,total)+1;
      }else{
      	return total;
      }
    } if(n >= s.length()){
      	return total;
      } n >= s.length() n s.length() s.length s {
      	return total;
      } return total; total char x = s.charAt(n); x s.charAt(n) s.charAt s n if(x=='A'||x=='C'||x=='G'||x=='T'){
      	return getLength(s,n+1,total)+1;
      }else{
      	return total;
      } x=='A'||x=='C'||x=='G'||x=='T' x=='G' x=='A'||x=='C'||x=='G'||x=='T' x=='A' x 'A' x=='C' x 'C' x=='G' x 'G' x=='T' x 'T' {
      	return getLength(s,n+1,total)+1;
      } return getLength(s,n+1,total)+1; getLength(s,n+1,total)+1 getLength(s,n+1,total) getLength s n+1 n 1 total 1 {
      	return total;
      } return total; total String s s int n n int total total public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      String str = sc.next();
      int a = 0;
      int result = 0;
      for(int i = 0;i < str.length();i++){
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      }
      System.out.println(result);
    }
  
  	public static int getLength(String s,int n,int total){
      if(n >= s.length()){
      	return total;
      }
      char x = s.charAt(n);
      if(x=='A'||x=='C'||x=='G'||x=='T'){
      	return getLength(s,n+1,total)+1;
      }else{
      	return total;
      }
    }
} public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      String str = sc.next();
      int a = 0;
      int result = 0;
      for(int i = 0;i < str.length();i++){
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      }
      System.out.println(result);
    }
  
  	public static int getLength(String s,int n,int total){
      if(n >= s.length()){
      	return total;
      }
      char x = s.charAt(n);
      if(x=='A'||x=='C'||x=='G'||x=='T'){
      	return getLength(s,n+1,total)+1;
      }else{
      	return total;
      }
    }
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      String str = sc.next();
      int a = 0;
      int result = 0;
      for(int i = 0;i < str.length();i++){
      	a = getLength(str,i,0);
        result = Math.max(a,result);
      }
      System.out.println(result);
    }
  
  	public static int getLength(String s,int n,int total){
      if(n >= s.length()){
      	return total;
      }
      char x = s.charAt(n);
      if(x=='A'||x=='C'||x=='G'||x=='T'){
      	return getLength(s,n+1,total)+1;
      }else{
      	return total;
      }
    }
}