import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String str = sc.next();
      	Integer cnt = 0;
      	Integer tmp = 0;
		for(int i=0; i < str.length(); i++){
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        }
      	if(tmp > cnt){
            cnt = tmp;
        }  
		System.out.println(cnt);
      	return;
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String str = sc.next();
      	Integer cnt = 0;
      	Integer tmp = 0;
		for(int i=0; i < str.length(); i++){
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        }
      	if(tmp > cnt){
            cnt = tmp;
        }  
		System.out.println(cnt);
      	return;
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String str = sc.next();
      	Integer cnt = 0;
      	Integer tmp = 0;
		for(int i=0; i < str.length(); i++){
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        }
      	if(tmp > cnt){
            cnt = tmp;
        }  
		System.out.println(cnt);
      	return;
	} main {
		Scanner sc = new Scanner(System.in);
      	String str = sc.next();
      	Integer cnt = 0;
      	Integer tmp = 0;
		for(int i=0; i < str.length(); i++){
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        }
      	if(tmp > cnt){
            cnt = tmp;
        }  
		System.out.println(cnt);
      	return;
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc Integer cnt = 0; cnt 0 Integer tmp = 0; tmp 0 for(int i=0; i < str.length(); i++){
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        } int i=0; int i=0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        } {
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        } char C = str.charAt(i); C str.charAt(i) str.charAt str i if(C=='A'){
			tmp++;
            continue;
          } C=='A' C 'A' {
			tmp++;
            continue;
          } tmp++ tmp continue; if(C=='G'){
			tmp++;
            continue;
          } C=='G' C 'G' {
			tmp++;
            continue;
          } tmp++ tmp continue; if(C=='C'){
			tmp++;
            continue;
          } C=='C' C 'C' {
			tmp++;
            continue;
          } tmp++ tmp continue; if(C=='T'){
			tmp++;
            continue;
          } C=='T' C 'T' {
			tmp++;
            continue;
          } tmp++ tmp continue; if(tmp > cnt){
            cnt = tmp;
          } tmp > cnt tmp cnt {
            cnt = tmp;
          } cnt = tmp cnt tmp tmp = 0 tmp 0 if(tmp > cnt){
            cnt = tmp;
        } tmp > cnt tmp cnt {
            cnt = tmp;
        } cnt = tmp cnt tmp System.out.println(cnt) System.out.println System.out System System.out cnt return; String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String str = sc.next();
      	Integer cnt = 0;
      	Integer tmp = 0;
		for(int i=0; i < str.length(); i++){
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        }
      	if(tmp > cnt){
            cnt = tmp;
        }  
		System.out.println(cnt);
      	return;
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String str = sc.next();
      	Integer cnt = 0;
      	Integer tmp = 0;
		for(int i=0; i < str.length(); i++){
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        }
      	if(tmp > cnt){
            cnt = tmp;
        }  
		System.out.println(cnt);
      	return;
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String str = sc.next();
      	Integer cnt = 0;
      	Integer tmp = 0;
		for(int i=0; i < str.length(); i++){
          char C = str.charAt(i);
          if(C=='A'){
			tmp++;
            continue;
          }
          if(C=='G'){
			tmp++;
            continue;
          }
          if(C=='C'){
			tmp++;
            continue;
          }
          if(C=='T'){
			tmp++;
            continue;
          }
          if(tmp > cnt){
            cnt = tmp;
          }  
          tmp = 0;
        }
      	if(tmp > cnt){
            cnt = tmp;
        }  
		System.out.println(cnt);
      	return;
	}
}
