import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
      	int max = 0, n = 0;
      	for (int i = 0; i < S.length(); i++){
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        }
        System.out.println(max);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
      	int max = 0, n = 0;
      	for (int i = 0; i < S.length(); i++){
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        }
        System.out.println(max);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
      	int max = 0, n = 0;
      	for (int i = 0; i < S.length(); i++){
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        }
        System.out.println(max);
	} main {
		Scanner s = new Scanner(System.in);
		String S = s.next();
      	int max = 0, n = 0;
      	for (int i = 0; i < S.length(); i++){
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        }
        System.out.println(max);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) String S = s.next(); S s.next() s.next s int max = 0 max 0 n = 0; n 0 for (int i = 0; i < S.length(); i++){
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        } {
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        } String SS = S.substring(i, i + 1); SS S.substring(i, i + 1) S.substring S i i + 1 i 1 if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            } SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C") SS.equals("G") SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C") SS.equals("A") SS.equals SS "A" SS.equals("T") SS.equals SS "T" SS.equals("G") SS.equals SS "G" SS.equals("C") SS.equals SS "C" {
            	n++;
            } n++ n {
            	n = 0;
            } n = 0 n 0 if (max < n){
            		max = n;
            } max < n max n {
            		max = n;
            } max = n max n System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
      	int max = 0, n = 0;
      	for (int i = 0; i < S.length(); i++){
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        }
        System.out.println(max);
	}
} public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
      	int max = 0, n = 0;
      	for (int i = 0; i < S.length(); i++){
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        }
        System.out.println(max);
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception {
		Scanner s = new Scanner(System.in);
		String S = s.next();
      	int max = 0, n = 0;
      	for (int i = 0; i < S.length(); i++){
          	String SS = S.substring(i, i + 1);
          	//System.out.println(SS);
        	if (SS.equals("A") || SS.equals("T") || SS.equals("G") || SS.equals("C")){
            	n++;
            }
          	else {
            	n = 0;
            }
            if (max < n){
            		max = n;
            }
            //System.out.println(n + " " + max);
            
        }
        System.out.println(max);
	}
}