import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.*;
class Main
{
  public static void main(String[] args)throws Exception {
    
    //System.out.println("Hello Codiva");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String str = br.readLine();
    int count = 0 ;
    ArrayList<Integer> a = new ArrayList<>();
   	for(int i= 0 ;i<str.length() ; i++){
      if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      }
    
    }
     if(count!=0){
          a.add(count);
          count = 0 ;
        }
    if(!a.isEmpty()){
    int max = Collections.max(a , null);
    System.out.println(max);
    }else{
      System.out.println(0);
    }
  }
} import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io import java.util.*; util.* java class Main
{
  public static void main(String[] args)throws Exception {
    
    //System.out.println("Hello Codiva");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String str = br.readLine();
    int count = 0 ;
    ArrayList<Integer> a = new ArrayList<>();
   	for(int i= 0 ;i<str.length() ; i++){
      if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      }
    
    }
     if(count!=0){
          a.add(count);
          count = 0 ;
        }
    if(!a.isEmpty()){
    int max = Collections.max(a , null);
    System.out.println(max);
    }else{
      System.out.println(0);
    }
  }
} Main public static void main(String[] args)throws Exception {
    
    //System.out.println("Hello Codiva");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String str = br.readLine();
    int count = 0 ;
    ArrayList<Integer> a = new ArrayList<>();
   	for(int i= 0 ;i<str.length() ; i++){
      if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      }
    
    }
     if(count!=0){
          a.add(count);
          count = 0 ;
        }
    if(!a.isEmpty()){
    int max = Collections.max(a , null);
    System.out.println(max);
    }else{
      System.out.println(0);
    }
  } main {
    
    //System.out.println("Hello Codiva");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String str = br.readLine();
    int count = 0 ;
    ArrayList<Integer> a = new ArrayList<>();
   	for(int i= 0 ;i<str.length() ; i++){
      if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      }
    
    }
     if(count!=0){
          a.add(count);
          count = 0 ;
        }
    if(!a.isEmpty()){
    int max = Collections.max(a , null);
    System.out.println(max);
    }else{
      System.out.println(0);
    }
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br int count = 0 ; count 0 ArrayList<Integer> a = new ArrayList<>(); a new ArrayList<>() for(int i= 0 ;i<str.length() ; i++){
      if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      }
    
    } int i= 0 ; int i= 0 ; i 0 i<str.length() i str.length() str.length str i++ i++ i {
      if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      }
    
    } {
      if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      }
    
    } if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      } str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A' str.charAt(i) == 'T' str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A' str.charAt(i) == 'G' str.charAt(i) str.charAt str i 'G' str.charAt(i) == 'C' str.charAt(i) str.charAt str i 'C' str.charAt(i) == 'T' str.charAt(i) str.charAt str i 'T' str.charAt(i) == 'A' str.charAt(i) str.charAt str i 'A' {
    		count += 1 ;
       } count += 1 count 1 {
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      } if(count!=0){
          a.add(count);
          count = 0 ;
        } count!=0 count 0 {
          a.add(count);
          count = 0 ;
        } a.add(count) a.add a count count = 0 count 0 if(count!=0){
          a.add(count);
          count = 0 ;
        } count!=0 count 0 {
          a.add(count);
          count = 0 ;
        } a.add(count) a.add a count count = 0 count 0 if(!a.isEmpty()){
    int max = Collections.max(a , null);
    System.out.println(max);
    }else{
      System.out.println(0);
    } !a.isEmpty() a.isEmpty() a.isEmpty a {
    int max = Collections.max(a , null);
    System.out.println(max);
    } int max = Collections.max(a , null); max Collections.max(a , null) Collections.max Collections a null System.out.println(max) System.out.println System.out System System.out max {
      System.out.println(0);
    } System.out.println(0) System.out.println System.out System System.out 0 String[] args args
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.*;
class Main
{
  public static void main(String[] args)throws Exception {
    
    //System.out.println("Hello Codiva");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String str = br.readLine();
    int count = 0 ;
    ArrayList<Integer> a = new ArrayList<>();
   	for(int i= 0 ;i<str.length() ; i++){
      if(str.charAt(i) == 'G' || str.charAt(i) == 'C' || str.charAt(i) == 'T' || str.charAt(i) == 'A'){
    		count += 1 ;
       }
      else{
        if(count!=0){
          a.add(count);
          count = 0 ;
        }
      }
    
    }
     if(count!=0){
          a.add(count);
          count = 0 ;
        }
    if(!a.isEmpty()){
    int max = Collections.max(a , null);
    System.out.println(max);
    }else{
      System.out.println(0);
    }
  }
}
