import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String str = sc.next();
   int count = 0;
   int countmem = 0;
 for (int i = 0; i < str.length(); i++) {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  }
    System.out.print(countmem);
 }
} import java.util.Scanner; Scanner java.util public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String str = sc.next();
   int count = 0;
   int countmem = 0;
 for (int i = 0; i < str.length(); i++) {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  }
    System.out.print(countmem);
 }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String str = sc.next();
   int count = 0;
   int countmem = 0;
 for (int i = 0; i < str.length(); i++) {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  }
    System.out.print(countmem);
 } main {
   Scanner sc = new Scanner(System.in);
   String str = sc.next();
   int count = 0;
   int countmem = 0;
 for (int i = 0; i < str.length(); i++) {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  }
    System.out.print(countmem);
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int count = 0; count 0 int countmem = 0; countmem 0 for (int i = 0; i < str.length(); i++) {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  } {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  } if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    } str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G' str.charAt(i) == 'C' str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G' str.charAt(i) == 'A' str.charAt(i) str.charAt str i 'A' str.charAt(i) == 'T' str.charAt(i) str.charAt str i 'T' str.charAt(i) == 'C' str.charAt(i) str.charAt str i 'C' str.charAt(i) == 'G' str.charAt(i) str.charAt str i 'G' {
       count++;
    } count++ count {
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    } if(countmem < count){
      countmem = count;
      } countmem < count countmem count {
      countmem = count;
      } countmem = count countmem count count = 0 count 0 if(i == str.length()-1 && countmem < count){
      countmem = count;      
   } i == str.length()-1 && countmem < count i == str.length()-1 i str.length()-1 str.length() str.length str 1 countmem < count countmem count {
      countmem = count;      
   } countmem = count countmem count System.out.print(countmem) System.out.print System.out System System.out countmem String[] args args public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String str = sc.next();
   int count = 0;
   int countmem = 0;
 for (int i = 0; i < str.length(); i++) {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  }
    System.out.print(countmem);
 }
} public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String str = sc.next();
   int count = 0;
   int countmem = 0;
 for (int i = 0; i < str.length(); i++) {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  }
    System.out.print(countmem);
 }
} Main
import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String str = sc.next();
   int count = 0;
   int countmem = 0;
 for (int i = 0; i < str.length(); i++) {
	if(str.charAt(i) == 'A' || str.charAt(i) == 'T' ||
       str.charAt(i) == 'C' || str.charAt(i) == 'G'){
       count++;
    }else{
      if(countmem < count){
      countmem = count;
      }
      count = 0;
    }
   if(i == str.length()-1 && countmem < count){
      countmem = count;      
   }
  }
    System.out.print(countmem);
 }
}