import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String S = sc.next();
		 int count = 0;
		 int temp = 0;
		 for(int i=0; i<S.length(); i++) {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 }
		 System.out.print(temp);
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String S = sc.next();
		 int count = 0;
		 int temp = 0;
		 for(int i=0; i<S.length(); i++) {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 }
		 System.out.print(temp);
	}
} Main public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String S = sc.next();
		 int count = 0;
		 int temp = 0;
		 for(int i=0; i<S.length(); i++) {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 }
		 System.out.print(temp);
	} main {
		 Scanner sc = new Scanner(System.in);
		 String S = sc.next();
		 int count = 0;
		 int temp = 0;
		 for(int i=0; i<S.length(); i++) {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 }
		 System.out.print(temp);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int count = 0; count 0 int temp = 0; temp 0 for(int i=0; i<S.length(); i++) {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 } 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)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 } {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 } if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 } S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G' S.charAt(i)=='C' S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G' S.charAt(i)=='A' S.charAt(i) S.charAt S i 'A' S.charAt(i)=='T' S.charAt(i) S.charAt S i 'T' S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' S.charAt(i)=='G' S.charAt(i) S.charAt S i 'G' {
				 count++;
			 } count++ count {
				 count = 0;
			 } count = 0 count 0 if(temp < count) {
				 temp = count;
			 } temp < count temp count {
				 temp = count;
			 } temp = count temp count System.out.print(temp) System.out.print System.out System System.out temp String[] args args public class Main{

	public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String S = sc.next();
		 int count = 0;
		 int temp = 0;
		 for(int i=0; i<S.length(); i++) {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 }
		 System.out.print(temp);
	}
} public class Main{

	public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String S = sc.next();
		 int count = 0;
		 int temp = 0;
		 for(int i=0; i<S.length(); i++) {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 }
		 System.out.print(temp);
	}
} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String S = sc.next();
		 int count = 0;
		 int temp = 0;
		 for(int i=0; i<S.length(); i++) {
			 if(S.charAt(i)=='A'||S.charAt(i)=='T'||S.charAt(i)=='C'||S.charAt(i)=='G') {
				 count++;
			 }else {
				 count = 0;
			 }
			 if(temp < count) {
				 temp = count;
			 }
		 }
		 System.out.print(temp);
	}
}