import 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 res = 0;
      	//String regex = "A|C|G|T";
      	//Pattern p = Pattern.compile(regex);
      	for(int i = 0; i < str.length(); i++){
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          }
      	System.out.println(res);
        
     }
} 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 count = 0;
      	//カウント最大値入れ物
      	int res = 0;
      	//String regex = "A|C|G|T";
      	//Pattern p = Pattern.compile(regex);
      	for(int i = 0; i < str.length(); i++){
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          }
      	System.out.println(res);
        
     }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	//文字列
      	String str = sc.next();
      	//カウント用
      	int count = 0;
      	//カウント最大値入れ物
      	int res = 0;
      	//String regex = "A|C|G|T";
      	//Pattern p = Pattern.compile(regex);
      	for(int i = 0; i < str.length(); i++){
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          }
      	System.out.println(res);
        
     } main {
		Scanner sc = new Scanner(System.in);
      	//文字列
      	String str = sc.next();
      	//カウント用
      	int count = 0;
      	//カウント最大値入れ物
      	int res = 0;
      	//String regex = "A|C|G|T";
      	//Pattern p = Pattern.compile(regex);
      	for(int i = 0; i < str.length(); i++){
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          }
      	System.out.println(res);
        
     } 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 res = 0; res 0 for(int i = 0; i < str.length(); i++){
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          } {
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          } if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          } str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C' str.charAt(i) == 'G' str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C' 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) == 'G' str.charAt(i) str.charAt str i 'G' str.charAt(i) == 'C' str.charAt(i) str.charAt str i 'C' {
            count++;
          } count++ count {
          	count =0;
          } count =0 count 0 res = Math.max(count,res) res Math.max(count,res) Math.max Math count res System.out.println(res) System.out.println System.out System System.out res 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 res = 0;
      	//String regex = "A|C|G|T";
      	//Pattern p = Pattern.compile(regex);
      	for(int i = 0; i < str.length(); i++){
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          }
      	System.out.println(res);
        
     }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	//文字列
      	String str = sc.next();
      	//カウント用
      	int count = 0;
      	//カウント最大値入れ物
      	int res = 0;
      	//String regex = "A|C|G|T";
      	//Pattern p = Pattern.compile(regex);
      	for(int i = 0; i < str.length(); i++){
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          }
      	System.out.println(res);
        
     }
} Main
import 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 res = 0;
      	//String regex = "A|C|G|T";
      	//Pattern p = Pattern.compile(regex);
      	for(int i = 0; i < str.length(); i++){
      	//Matcher m = p.matcher(str.charAt(i));

          //if (m.find()){
          if(str.charAt(i) == 'A' || str.charAt(i) == 'T' || str.charAt(i) == 'G' || str.charAt(i) == 'C'){
            count++;
          }else{
          	count =0;
          }
            res = Math.max(count,res);
          }
      	System.out.println(res);
        
     }
}