import java.util.*;
import java.io.*;
 
public class Main {
 
  public static void main(String[] args)throws IOException {
	  BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
	  String S = br.readLine();
	  int temp = 0;
	  int counter = 0;
	  for(int i =0; i<S.length(); i++) {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  }
	  temp = Math.max(temp, counter);
	  System.out.println(temp);
  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
 
  public static void main(String[] args)throws IOException {
	  BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
	  String S = br.readLine();
	  int temp = 0;
	  int counter = 0;
	  for(int i =0; i<S.length(); i++) {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  }
	  temp = Math.max(temp, counter);
	  System.out.println(temp);
  }
} Main public static void main(String[] args)throws IOException {
	  BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
	  String S = br.readLine();
	  int temp = 0;
	  int counter = 0;
	  for(int i =0; i<S.length(); i++) {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  }
	  temp = Math.max(temp, counter);
	  System.out.println(temp);
  } main {
	  BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
	  String S = br.readLine();
	  int temp = 0;
	  int counter = 0;
	  for(int i =0; i<S.length(); i++) {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  }
	  temp = Math.max(temp, counter);
	  System.out.println(temp);
  } BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String S = br.readLine(); S br.readLine() br.readLine br int temp = 0; temp 0 int counter = 0; counter 0 for(int i =0; i<S.length(); i++) {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  } int i =0; int i =0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  } {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  } if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  } S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' S.charAt(i) == 'G' S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' S.charAt(i) == 'G' S.charAt(i) S.charAt S i 'G' S.charAt(i) == 'T' S.charAt(i) S.charAt S i 'T' {
			  counter++;
		  } counter++ counter {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  } temp = Math.max(temp, counter++) temp Math.max(temp, counter++) Math.max Math temp counter++ counter counter = 0 counter 0 temp = Math.max(temp, counter) temp Math.max(temp, counter) Math.max Math temp counter System.out.println(temp) System.out.println System.out System System.out temp String[] args args public class Main {
 
  public static void main(String[] args)throws IOException {
	  BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
	  String S = br.readLine();
	  int temp = 0;
	  int counter = 0;
	  for(int i =0; i<S.length(); i++) {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  }
	  temp = Math.max(temp, counter);
	  System.out.println(temp);
  }
} public class Main {
 
  public static void main(String[] args)throws IOException {
	  BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
	  String S = br.readLine();
	  int temp = 0;
	  int counter = 0;
	  for(int i =0; i<S.length(); i++) {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  }
	  temp = Math.max(temp, counter);
	  System.out.println(temp);
  }
} Main
import java.util.*;
import java.io.*;
 
public class Main {
 
  public static void main(String[] args)throws IOException {
	  BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
	  String S = br.readLine();
	  int temp = 0;
	  int counter = 0;
	  for(int i =0; i<S.length(); i++) {
		  if(S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T' ) {
			  counter++;
		  } else {
			 temp = Math.max(temp, counter++);
			 counter = 0;
		  }
	  }
	  temp = Math.max(temp, counter);
	  System.out.println(temp);
  }
}