import java.util.*;
 
public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		String s = in.next();
        int n =  s.length();
        int count = 0;
        int max = 0;
		char[] s_c = s.toCharArray();
      
      for(int i = 0;i < n ;i++){
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      }
      
      System.out.print(max);
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		String s = in.next();
        int n =  s.length();
        int count = 0;
        int max = 0;
		char[] s_c = s.toCharArray();
      
      for(int i = 0;i < n ;i++){
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      }
      
      System.out.print(max);
	}
} Main public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		String s = in.next();
        int n =  s.length();
        int count = 0;
        int max = 0;
		char[] s_c = s.toCharArray();
      
      for(int i = 0;i < n ;i++){
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      }
      
      System.out.print(max);
	} main {
		Scanner in = new Scanner(System.in);
		
		String s = in.next();
        int n =  s.length();
        int count = 0;
        int max = 0;
		char[] s_c = s.toCharArray();
      
      for(int i = 0;i < n ;i++){
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      }
      
      System.out.print(max);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next(); s in.next() in.next in int n =  s.length(); n s.length() s.length s int count = 0; count 0 int max = 0; max 0 char[] s_c = s.toCharArray(); s_c s.toCharArray() s.toCharArray s for(int i = 0;i < n ;i++){
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      } {
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      } if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       } s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T' s_c[i]=='G' s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T' s_c[i]=='A' s_c[i] s_c i 'A' s_c[i]=='C' s_c[i] s_c i 'C' s_c[i]=='G' s_c[i] s_c i 'G' s_c[i]=='T' s_c[i] s_c i 'T' {
         count++;
       } count++ count {
        count = 0;
       } count = 0 count 0 max = Math.max(max,count) max Math.max(max,count) Math.max Math max count System.out.print(max) System.out.print System.out System System.out max String[] args args public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		String s = in.next();
        int n =  s.length();
        int count = 0;
        int max = 0;
		char[] s_c = s.toCharArray();
      
      for(int i = 0;i < n ;i++){
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      }
      
      System.out.print(max);
	}
} public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		String s = in.next();
        int n =  s.length();
        int count = 0;
        int max = 0;
		char[] s_c = s.toCharArray();
      
      for(int i = 0;i < n ;i++){
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      }
      
      System.out.print(max);
	}
} Main
import java.util.*;
 
public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		String s = in.next();
        int n =  s.length();
        int count = 0;
        int max = 0;
		char[] s_c = s.toCharArray();
      
      for(int i = 0;i < n ;i++){
       if(s_c[i]=='A'||s_c[i]=='C'||s_c[i]=='G'||s_c[i]=='T'){
         count++;
       }else{
        count = 0;
       }
        max = Math.max(max,count);
      }
      
      System.out.print(max);
	}
}