import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
	public static void main(String[] args) {
         
      try (Scanner scan = new Scanner(System.in)) {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    }
    }
} import java.util.Scanner; Scanner java.util import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {
	public static void main(String[] args) {
         
      try (Scanner scan = new Scanner(System.in)) {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    }
    }
} Main public static void main(String[] args) {
         
      try (Scanner scan = new Scanner(System.in)) {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    }
    } main {
         
      try (Scanner scan = new Scanner(System.in)) {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    }
    } try (Scanner scan = new Scanner(System.in)) {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    } {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    } Scanner scan = new Scanner(System.in) Scanner scan = new Scanner(System.in) new Scanner(System.in) String input = scan.next(); input scan.next() scan.next scan Pattern p = Pattern.compile("[ATGC]+"); p Pattern.compile("[ATGC]+") Pattern.compile Pattern "[ATGC]+" Matcher m = p.matcher(input); m p.matcher(input) p.matcher p input int maxlength = 0; maxlength 0 while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	} m.find() m.find m {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	} if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		} m.group().length() > maxlength m.group().length() m.group().length m.group() m.group m maxlength {
			maxlength = m.group().length();
		} maxlength = m.group().length() maxlength m.group().length() m.group().length m.group() m.group m System.out.println(maxlength) System.out.println System.out System System.out maxlength String[] args args public class Main {
	public static void main(String[] args) {
         
      try (Scanner scan = new Scanner(System.in)) {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    }
    }
} public class Main {
	public static void main(String[] args) {
         
      try (Scanner scan = new Scanner(System.in)) {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    }
    }
} Main
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
	public static void main(String[] args) {
         
      try (Scanner scan = new Scanner(System.in)) {
        String input = scan.next();
        Pattern p = Pattern.compile("[ATGC]+");
	Matcher m = p.matcher(input);
	int maxlength = 0;
	while (m.find()) {
		if (m.group().length() > maxlength) {
			maxlength = m.group().length();
		}
	}
      System.out.println(maxlength);  
    }
    }
}